Skip to content

mishra-ankit-learn/ui-router-react

This branch is 2 commits ahead of ui-router/react:master.

Folders and files

NameName
Last commit message
Last commit date
Jul 27, 2021
Jan 13, 2017
Mar 29, 2020
Sep 4, 2016
Mar 22, 2024
Sep 13, 2016
Dec 26, 2019
May 9, 2020
Dec 31, 2017
May 3, 2018
May 16, 2018
Jul 27, 2021
Jan 6, 2020
Jul 1, 2017
Jan 30, 2018
Sep 23, 2017
Dec 28, 2017
Jul 27, 2021
Jul 27, 2021
Sep 20, 2020
Oct 10, 2019
Sep 20, 2020
Sep 20, 2020
Apr 9, 2018
Jul 27, 2021

Repository files navigation

UI-Router-React

Greenkeeper badge

UI-Router provides extremely flexible, state based routing to the React ecosystem.

Routing frameworks for SPAs update the browser's URL as the user navigates through the app. Conversely, this allows changes to the browser's URL to drive navigation through the app, thus allowing the user to create a bookmark to a location deep within the SPA.

UI-Router applications are modeled as a hierarchical tree of states. UI-Router provides a state machine to manage the transitions between those application states in a transaction-like manner.

Docs & Resources

Getting started

The UI-Router package is distributed using npm, the node package manager.

yarn add @uirouter/react

Import UIRouter into your project, define some states and you're good to go!

import React from 'react';
import ReactDOM from 'react-dom';
import { UIRouter, UIView, pushStateLocationPlugin } from '@uirouter/react';
import Home from './components/Home';

// define your states
const states = [
  {
    name: 'home',
    url: '/home',
    component: Home,
  },
];

// select your plugins
const plugins = [pushStateLocationPlugin];

ReactDOM.render(
  <UIRouter plugins={plugins} states={states}>
    <UIView />
  </UIRouter>,
  document.getElementById('root'),
);

About

🔼 UI-Router for React

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.8%
  • JavaScript 1.2%