December 2019
Intermediate to advanced
474 pages
10h 3m
English
Now that we've set up React so that it works with Babel and webpack, we need to create an actual React component that can be compiled and run. Creating a new React project involves adding some new files to the project and making changes to the setup for webpack. Let's get started:
import React from 'react';import ReactDOM from 'react-dom';const App = () => { return <h1>movieList</h1>;};ReactDOM.render(<App />, document.getElementById('root'));
As you can see, this file imports the react and react-dom packages, defines a simple component that returns an h1 element containing the name of your application, ...
Read now
Unlock full access