react-router-component

Declarative router component for React.

Github星跟踪图

React Router Component

TravisCI Build Status, Version, Compatibility, ---------------, --------------, >= 0.39.0, React v15,16, >= 0.32.0, React v15, >= 0.27.0, React 0.14, 0.24 - 0.26.0, React 0.13, 0.23 - 0.26.0, React 0.12, 0.20 - 0.22.2, React 0.11, < 0.20, React 0.10, React router component allows you to define routes in your React application
in a declarative manner, directly as a part of your component hierarchy.

Project Overview

Usage is as simple as just returning a configured router component from your
component's render() method:

<Locations>
  <Location path="/" handler={MainPage} />
  <Location path="/users/:username" handler={UserPage} />
  <Location path="/search/*" handler={SearchPage} />
  <Location path={/\/product\/([0-9]*)/} handler={ProductPage} />
</Locations>

Having routes defined as a part of your component hierarchy allows to
dynamically reconfigure routing based on your application state. For example you
can return a different set of allowed locations for anonymous and signed-in
users.

React router component can dispatch based on location.pathname or
location.hash if browser doesn't support History API (see hash routing).

Props can be passed through the router by setting them directly on each <Location>, or to all possible routes
via a childProps hash.

Furthermore it provides advanced features like support for regex matching,
full page server side rendering, multiple routers on the same page,
querystring parsing, and contextual routers.

Its functionality is tested using Saucelabs on all modern browsers (IE >= 9,
Chrome >= 27, Firefox >= 25, Safari >= 6 and Mobile Safari on iPhone and iPad >=
6).

Its size is about 3.5kb gzipped.

Installation

React router component is packaged on npm:

% npm install react-router-component

Docs

主要指标

概览
名称与所有者streamio/streamio-ffmpeg
主编程语言Ruby
编程语言Makefile (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2010-04-06 14:30:49
推送于2024-05-08 12:47:14
最后一次提交2019-06-24 15:29:31
发布数32
最新版本名称v3.0.2 (发布于 2016-11-18 11:54:19)
第一版名称v0.5.0 (发布于 )
用户参与
星数1.7k
关注者数84
派生数420
提交数349
已启用问题?
问题数114
打开的问题数38
拉请求数33
打开的拉请求数28
关闭的拉请求数59
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?