How to use the mobx-router.startRouter function in mobx-router

To help you get started, we’ve selected a few mobx-router examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github blueskydigital / react-mobx-admin / examples / blog / js / main.js View on Github external
import React from 'react'
import { render } from 'react-dom'
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
import DevTools from 'mobx-react-devtools'
import { startRouter } from 'mobx-router'
import views from './routeconfig'

// use it to create the app state
import StateStore from './state'
const store = new StateStore(views)
startRouter(views, store)

// init react components part using the only prop: the store
import { App } from './components/app'
const mount = document.getElementById("app")  // mountpoint
render((
  <div>
    
      
    
    {Conf.debug ? () : null}
  </div>
), mount)  // and final render
github be-neo / neoblog / packages / client / src / App.jsx View on Github external
// Imports
import React from "react";
import { Layout } from "antd";
import { MobxRouter, startRouter, Link } from "mobx-router";

import store from "./lib/store";
import views from "./components/views/views";

// Components
import NeoLogo from "./components/icons/NeoLogo";

const { Content, Header } = Layout;

startRouter(views, store);

const App = () =&gt; (
  
    <header style="{{">
      
        Neo<span>blog</span>
      
      <span>
        
      </span>
    </header>
    
      <content>
        
      </content>
github mateeyow / sizzy-docker / src / index.js View on Github external
//components
import App from 'components/App';

//style
import 'styles/index.css';
import 'normalize.css';
import 'font-awesome/css/font-awesome.css';

//mobx
import {Provider} from 'mobx-react';

//router
import {startRouter} from 'mobx-router';
import views from 'config/views';
startRouter(views, store);

ReactDOM.render(
  
    
  ,
  document.getElementById('root')
);

mobx-router

A simple router for MobX

ISC
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis