Fetching contributors…
Cannot retrieve contributors at this time
83 lines (57 sloc) 2.51 KB
title layout excerpt sitemap permalink
UI-Router for React
State based routing for React

{% include toc icon="columns" title="React" %}

<iframe style="display: inline-block;" src="" frameborder="0" scrolling="0" width="160px" height="30px"></iframe><iframe style="display: inline-block;" src="" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>

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

Getting UI-Router

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

npm install --save @uirouter/react


Learn UI-Router by following our tutorials.

Sample application

The UI-Router Sample App is a non-trivial UI-Router application.

API Docs

UI-Router is written in Typescript. We generate detailed API docs from the typescript code and comments.


To fix a UI-Router bug, or create an enhancement, follow these steps:

The Typescript source code for UI-Router for React can be found at The React code depends on on UI-Router Core, which is found at

To get started you will need to clone the UI-Router Core and UI-Router React repositories.

git clone ui-router-core
git clone ui-router-react

Then, you will need to build ui-router core and link it locally using npm link

cd ui-router-core
npm install
npm link
npm run build

Then, link to it from the ui-router-react repository

cd ../ui-router-react
npm install
npm link ui-router-core

To make changes to ui-router-core you should run the npm run watch script from the ui-router-core directory. This will watch the ui-router core code, compile it, and run the test suite when the core code (or tests) are modified.

cd ../ui-router-core
npm run watch