title | layout | excerpt | sitemap | permalink |
---|---|---|---|---|
UI-Router for React |
single |
State based routing for React |
true |
/react/ |
{% include toc icon="columns" title="React" %}
<iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=ui-router&repo=react&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe><iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=ui-router&repo=react&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
UI-Router provides extremely flexible, state based routing to the React ecosystem.
The UI-Router package is distributed using npm, the node package manager.
npm install --save @uirouter/react
Learn UI-Router by following our tutorials.
The UI-Router Sample App is a non-trivial UI-Router application.
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 https://github.com/ui-router/react The React code depends on on UI-Router Core, which is found at https://github.com/ui-router/core
To get started you will need to clone the UI-Router Core and UI-Router React repositories.
git clone https://github.com/ui-router/core ui-router-core
git clone https://github.com/ui-router/react 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