MyGit

ui-router/react

Fork: 130 Star: 518 (更新于 2024-11-18 23:37:05)

license: MIT

Language: TypeScript .

🔼 UI-Router for React

最后发布版本: 1.0.7 ( 2021-07-27 08:03:58)

官方网址 GitHub网址

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'),
);

最近版本更新:(数据更新于 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-11-22 01:36:46 twentyhq/twenty

2024-11-21 22:40:05 LLOneBot/LLOneBot

2024-11-21 20:34:48 CopilotKit/CopilotKit

2024-11-21 16:58:07 labring/FastGPT

2024-11-21 16:14:54 RSSNext/Follow

2024-11-21 16:12:23 x-extends/vxe-table