O'Reilly logo

React 16 Tooling by Adam Boduch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Putting it all together

Let's quickly look at the source files that bring everything together to give you a sense of completeness. Let's start with index.js:

import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import Root from './components/Root';
import registerServiceWorker from './registerServiceWorker';

ReactDOM.render(<Root />, document.getElementById('root'));
registerServiceWorker();

This looks just like most index.js files in create-react-app that you've worked with so far in this book. Instead of rendering an App component, it's rendering a Root component. Let's look at this next:

import React from 'react'; import { Provider } from 'react-redux'; import App from './App'; import store from '../store'; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required