1.0.21 • Published 4 years ago
@jswork/service-react-route v1.0.21
service-react-route
React router route service..
installation
npm install @jswork/service-react-route
usage
import React from 'react';
import ServiceReactRoute from '@jswork/service-react-route';
import { routes } from '@/shared/routes';
export class App extends React.Component {
private routerRef: React.Ref<Router> = React.createRef();
componentDidMount() {
nx.$route = ServiceReactRoute.getInstance({ context: this.routerRef });
}
render() {
return <Router ref={this.routerRef}>{renderRoutes(routes)}</Router>
}
}
documentation
license
Code released under the MIT license.
1.0.21
4 years ago
1.0.20
4 years ago
1.0.19
4 years ago
1.0.18
4 years ago
1.0.17
4 years ago
1.0.16
4 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.11
4 years ago
1.0.10
4 years ago
1.0.14
4 years ago
1.0.13
4 years ago
1.0.12
4 years ago
1.0.5
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.0
4 years ago