15. Promise API and async/await
Activity 15.01: Creating a Movie App
Solution
- Install
create-react-appfor the project namedsearch-movies. - In the
srcfolder, remove all the existing files. Once they are removed, create a new file called index.js and add the following code. It will import the<App>component and render it in HTML:import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/App'; ReactDOM.render(<App />, document.querySelector('#root')); - Still in the
srcfolder, create a folder called components and create a file calledApp.jsinside the component folder. Once this is done, add some boilerplate for the<App>component:import React from 'react'; const App = () => { Â Â return( Â Â Â Â <div className="page"> Â Â <h1>5 Most Popular Movies Now</h1> Â Â Â Â </div> Â ...