ui-router/react
Fork: 130 Star: 517 (更新于 2024-12-12 03:12:02)
license: MIT
Language: TypeScript .
🔼 UI-Router for React
最后发布版本: 1.0.7 ( 2021-07-27 08:03:58)
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'),
);
最近版本更新:(数据更新于 2024-10-02 03:24:10)
2021-07-27 08:03:58 1.0.7
2020-12-23 04:29:25 1.0.6
2020-12-22 02:38:05 1.0.5
2020-12-16 09:21:28 1.0.4
2020-04-30 03:41:56 1.0.3
2020-02-24 08:03:51 1.0.2
2020-02-05 05:58:15 1.0.1
2020-01-08 06:15:29 1.0.0
2019-10-11 03:50:19 0.8.10
2019-01-30 03:53:44 0.8.9
主题(topics):
javascript, react, router, spa, state-machine, typescript, ui-router
ui-router/react同语言 TypeScript最近更新仓库
2024-12-22 15:05:26 elizaOS/eliza
2024-12-21 21:40:12 lobehub/lobe-chat
2024-12-21 12:01:51 siyuan-note/siyuan
2024-12-21 09:15:35 MetaCubeX/metacubexd
2024-12-21 04:50:26 mediar-ai/screenpipe
2024-12-20 19:36:48 vitejs/vite