February 2019
Intermediate to advanced
204 pages
4h 52m
English
Let's create our first container component, inside of app/containers/App/index.js:
import React from 'react';import HomePage from 'containers/HomePage/Loadable';export default function App() { return ( <div> <HomePage /> </div> );}
The home page container contains two files, Loadable.js and index.js:
import loadable from 'loadable-components';export default loadable(() => import('./index'));
The index.js is as follows:
import React, { PureComponent } from 'react';/* eslint-disable react/prefer-stateless-function */export default class HomePage extends PureComponent { render() { return <h1>This is the HomePage Redux-book container!</h1>; }}
The complete code for this project can be found in the GitHub repository, ...
Read now
Unlock full access