Adds deferred asynchronous rendering to react router
Please ★ this repo if you found it useful ★ ★ ★
- Adds asynchronous
componentDefer
method prop toRoute
component - Adds asynchronous
renderDefer
method prop toRoute
component - Adds asynchronous deferred hook to
history.push
npm install --save react-router-defer
import React, { Component } from 'react';
import { Switch, Route } from 'react-router-defer';
export default class Routes extends Component {
render() {
return (
<Switch>
<Route exact path="/" componentDefer={() => import('./Home')} />
<Route componentDefer={() => import('./NotFound')} />
</Switch>
);
}
}
Contribute usage docs
Submit an issue
Contribute a screenshot
Review the guidelines for contributing
Jam Risser © 2018
Review the changelog
- Jam Risser - Author
A ridiculous amount of coffee ☕ ☕ ☕ was consumed in the process of building this project.
Add some fuel if you'd like to keep me going!