Bard mobx router

Bard mobx router

  • Github

›How to's

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

How-to's / FAQ

Simple solutions for challenges that one faces usually with routing.

How to redirect?

Use the intercept hook in the relevant routes config and return a new request.

Example

'/some-route': {
  intercept (request, router) {
    if (shouldRedirect()) {
      request.route = '/somewhere-else'
    }
    return request
  },
},

How to reset the window scroll when navigating?

Use the scrollPlugin.

← Html5 history plugin
  • How to redirect?
  • How to reset the window scroll when navigating?
Bard mobx router
Docs
Getting Started
Community
Who is using this?Chat on Gitter
More
GitHub
Copyright © 2023 Aodev