plandem / rrrouter-provider-history

Implementation of Provider with direct usage of history

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#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

  1. 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')
);

About

Implementation of Provider with direct usage of history


Languages

Language:JavaScript 100.0%