react-router-historyjs-location
v0.0.1
Published
Location for react-router that utilizes History.js
Downloads
8
Readme
react-router-historyjs-location
By default if you try to use HistoryLocation in react-router on a browser that does not support it, it falls back to RefreshLocation. Maybe you don't want this (for example, displaying UI state). This shim lets you use window.History (provided by history.js) as a location in react-router.
Usage
history.js is not packaged to allow it to be pulled in through a require()
statement, so this library assumes that History.js is loaded on the page and that window.History
is defined.
document.addEventListener('DOMContentLoaded', function() {
var HistoryJsLocation = require('react-router-historyjs-location');
Router.run(routes, HistoryJsLocation, function (Handler) {
React.render(<Handler/>, document.body);
});
});