How to use the @uirouter/react.UIRouterReact function in @uirouter/react

To help you get started, we’ve selected a few @uirouter/react 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 DestinyItemManager / DIM / src / app / router.config.ts View on Github external
export default function makeRouter() {
  const router = new UIRouterReact();
  router.plugin(servicesPlugin);
  router.plugin(hashLocationPlugin);

  // Debug visualizer
  if ($featureFlags.debugRouter) {
    // tslint:disable-next-line:no-require-imports
    router.plugin(require('@uirouter/visualizer').Visualizer);
    router.trace.enable('TRANSITION');
  }

  // Register the initial (eagerly loaded) states
  states.forEach((state) => router.stateRegistry.register(state));

  // Global config for router
  router.urlService.rules.initial({ state: 'default-account' });
  router.urlService.rules.otherwise({ state: 'default-account' });
github ui-router / redux / examples / react / src / App.tsx View on Github external
import {
  pushStateLocationPlugin,
  UIRouterReact,
  UISref,
  UIView,
} from "@uirouter/react";
import { ConnectedUIRouter } from "@uirouter/redux/react";
import * as React from "react";
import { Provider } from "react-redux";

import createRoutedStore from "./redux/store";
import states from "./router/states";

const router = new UIRouterReact();
const store = createRoutedStore(router);

const App = () => (
  
    
      <div>
        <nav>
          <ul>
            
              <a>
                <li>home</li>
              </a></ul></nav></div>

@uirouter/react

State based routing for React

MIT
Latest version published 3 years ago

Package Health Score

57 / 100
Full package analysis

Similar packages