MobX State Router

MobX State Router

  • Docs
  • GitHub

›API

Guides

  • Getting Started
  • Recipes
  • Examples

API

  • Route
  • RouterLink
  • RouterState
  • RouterStore
  • RouterView
  • HistoryAdapter
  • StaticAdapter

RouterView

The RouterView component watches the router state and instantiates the associated UI component. It expects a viewMap prop, which is a simple mapping from routeNames to React components (or more generally ReactNodes).

interface ViewMap {
    [routeName: string]: React.ReactNode;
}

interface RouterViewProps {
    viewMap: ViewMap;
}

const RouterView: React.FC<RouterViewProps> = () => {...}
← RouterStoreHistoryAdapter →
Copyright © 2021 Naresh Bhatia