rrrouter-provider-history
v1.0.8
Published
Provider for rrrouter with history support
Downloads
3
Maintainers
Readme
#Purpose Implementation of Provider for rrrouter with direct usage of rrrouter-history as history session manager.
#Installation
npm install --save rrrouter-provider-history
#API
###Provider
| Property | Description | Type | Default | |------------|----------------|------------------|---------------| | history | Instance of any rrrouter-history to use as session manager | Object | no | | initHref | Initial href that will be used at startup | String | no |
#Usage
- Setup Provider
###Example.1 - setup Provider
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider, HashHistory } from 'rrrouter-provider-history';
const history = new HashHistory();
ReactDOM.render(
<Provider history={history} initHref='/'>
<div>Your application</div>
</Provider>,
document.getElementById('root')
);