1.0.2 • Published 6 years ago

react-route-async v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

React route asynchronous

Build asynchronous routes in a very easy way with react-router-async

npm install react-route-async --save
import React, { Component } from 'react';
import { Route, Switch } from 'react-router-dom';
import asyncComponent from './hoc/AsyncComponent/AsyncComponent';

const asyncLogout = asyncComponent(() => {
  return import('./containers/Logout/Logout');
});

class App extends Component {
  render() {
    <Switch>
      <Route path="/logout" component={asyncLogout} />
      // ...
    </Switch> 
  }
}

export default App;
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago