Bard mobx router

Bard mobx router

  • Github

›Plugins

About Bard router

  • Philosophy
  • Getting started

Router and routes

  • Route specific hooks
  • Router hooks

React UI Components

  • <Route/>
  • <Link/>

Plugins

  • Scroll plugin
  • Window title plugin
  • Html5 history plugin

How to's

  • How-to's / FAQ

Html5 history plugin

Synchronize the router with the browser history / URL.

You simply need to use the html5HistoryPlugin. Under the hood, it is using ReactTraining history.

You need to have history in your dependencies.

> npm install history

Here is an example using ES6 and the MobxRouter.

import {Router} from 'bard-router'
import html5HistoryPlugin from 'bard-router/lib/plugins/html5HistoryPlugin'

const router = new Router(/*...*/)
html5HistoryPlugin.register(router)

If needed, you can access the history instance returned by createBrowserHistory at router.history.

← Window title pluginHow-to's / FAQ →
Bard mobx router
Docs
Getting Started
Community
Who is using this?Chat on Gitter
More
GitHub
Copyright © 2023 Aodev