├── .watchmanconfig ├── packages ├── react-router-native │ ├── .gitattributes │ ├── .babelrc │ ├── android │ │ ├── settings.gradle │ │ ├── app │ │ │ ├── src │ │ │ │ └── main │ │ │ │ │ ├── res │ │ │ │ │ ├── values │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ └── mipmap-xxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── reactrouternative │ │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ │ └── MainApplication.java │ │ │ │ │ └── AndroidManifest.xml │ │ │ └── BUCK │ │ ├── keystores │ │ │ ├── debug.keystore.properties │ │ │ └── BUCK │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── build.gradle │ │ └── gradle.properties │ ├── docs │ │ ├── api │ │ │ ├── Route.md │ │ │ ├── Prompt.md │ │ │ ├── Router.md │ │ │ ├── Switch.md │ │ │ ├── Redirect.md │ │ │ ├── matchPath.md │ │ │ ├── withRouter.md │ │ │ ├── MemoryRouter.md │ │ │ ├── StaticRouter.md │ │ │ ├── DeepLinking.md │ │ │ ├── AndroidBackButton.md │ │ │ ├── NativeRouter.md │ │ │ └── Link.md │ │ └── guides │ │ │ └── deep-linking.md │ ├── ios │ │ ├── main.jsbundle.meta │ │ ├── ReactRouterNative │ │ │ ├── AppDelegate.h │ │ │ ├── main.m │ │ │ ├── Images.xcassets │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ ├── AppDelegate.m │ │ │ └── Info.plist │ │ └── ReactRouterNativeTests │ │ │ └── Info.plist │ ├── .buckconfig │ ├── index.ios.js │ ├── main.js │ ├── __tests__ │ │ ├── index.ios.js │ │ └── index.android.js │ ├── package.json │ ├── NativeRouter.js │ ├── README.md │ ├── .gitignore │ ├── AndroidBackButton.js │ ├── DeepLinking.js │ ├── rn-cli.config.js │ ├── Link.js │ ├── experimental │ │ └── TabRoutes.js │ ├── examples │ │ ├── Recursive.js │ │ ├── BoringExample.js │ │ ├── Params.js │ │ ├── CustomLink.js │ │ ├── NoMatch.js │ │ └── Ambiguous.js │ ├── .flowconfig │ └── index.android.js ├── react-router-website │ ├── .gitignore │ ├── modules │ │ ├── logo.png │ │ ├── .babelrc │ │ ├── index.js │ │ ├── Theme.js │ │ ├── components │ │ │ ├── SmallScreen.js │ │ │ ├── Loading.js │ │ │ ├── Home │ │ │ │ ├── index.js │ │ │ │ └── Video.js │ │ │ ├── MarkdownViewer.js │ │ │ ├── SourceViewer.js │ │ │ ├── Bundle.js │ │ │ ├── Logo.js │ │ │ ├── App.js │ │ │ ├── DelegateMarkdownLinks.js │ │ │ ├── Example.js │ │ │ ├── API.js │ │ │ ├── Guide.js │ │ │ ├── APISmall.js │ │ │ ├── Footer.js │ │ │ ├── WebExample.js │ │ │ ├── Environment.js │ │ │ ├── NativeExample.js │ │ │ └── EnvironmentHeader.js │ │ ├── LoadServiceWorker.js │ │ ├── .eslintrc │ │ ├── animated │ │ │ ├── guid.js │ │ │ ├── isAnimated.js │ │ │ ├── injectable │ │ │ │ ├── FlattenStyle.js │ │ │ │ ├── CancelAnimationFrame.js │ │ │ │ ├── RequestAnimationFrame.js │ │ │ │ ├── InteractionManager.js │ │ │ │ └── ApplyAnimatedValues.js │ │ │ ├── SetPolyfill.js │ │ │ ├── targets │ │ │ │ ├── react-native.js │ │ │ │ └── react-dom.js │ │ │ ├── Animated.js │ │ │ ├── AnimatedWithChildren.js │ │ │ ├── Animation.js │ │ │ ├── AnimatedTemplate.js │ │ │ ├── AnimatedTracking.js │ │ │ ├── AnimatedModulo.js │ │ │ ├── AnimatedProps.js │ │ │ └── AnimatedStyle.js │ │ ├── ReactRouterDOMShim.js │ │ ├── examples │ │ │ ├── Params.js │ │ │ ├── CustomLink.js │ │ │ ├── Recursive.js │ │ │ ├── NoMatch.js │ │ │ ├── Ambiguous.js │ │ │ ├── Basic.js │ │ │ ├── PreventingTransitions.js │ │ │ ├── RouteConfig.js │ │ │ └── Sidebar.js │ │ └── docs │ │ │ └── Core.js │ ├── static │ │ ├── favicon.ico │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── react-square.png │ │ ├── apple-touch-icon.png │ │ ├── mstile-150x150.png │ │ ├── android-chrome-144x144.png │ │ ├── browserconfig.xml │ │ ├── manifest.json │ │ └── safari-pinned-tab.svg │ ├── package.json │ └── index.html.ejs ├── react-router-dom │ ├── modules │ │ ├── Prompt.js │ │ ├── Route.js │ │ ├── Router.js │ │ ├── Switch.js │ │ ├── Redirect.js │ │ ├── matchPath.js │ │ ├── MemoryRouter.js │ │ ├── StaticRouter.js │ │ ├── withRouter.js │ │ ├── __tests__ │ │ │ ├── .eslintrc │ │ │ ├── HashRouter-test.js │ │ │ └── BrowserRouter-test.js │ │ ├── .babelrc │ │ ├── .eslintrc │ │ ├── index.js │ │ ├── HashRouter.js │ │ ├── BrowserRouter.js │ │ ├── NavLink.js │ │ └── Link.js │ ├── .gitignore │ ├── docs │ │ └── api │ │ │ ├── Route.md │ │ │ ├── Prompt.md │ │ │ ├── Router.md │ │ │ ├── Switch.md │ │ │ ├── matchPath.md │ │ │ ├── Redirect.md │ │ │ ├── withRouter.md │ │ │ ├── MemoryRouter.md │ │ │ ├── StaticRouter.md │ │ │ ├── Link.md │ │ │ ├── HashRouter.md │ │ │ ├── BrowserRouter.md │ │ │ └── NavLink.md │ ├── tests.webpack.js │ ├── tools │ │ ├── es2015-preset.js │ │ └── build.js │ ├── webpack.config.js │ └── README.md ├── react-router-redux │ ├── .gitignore │ ├── .babelrc │ ├── modules │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ └── ConnectedRouter-test.js.snap │ │ │ ├── middleware-test.js │ │ │ └── reducer-test.js │ │ ├── index.js │ │ ├── middleware.js │ │ ├── reducer.js │ │ ├── actions.js │ │ └── ConnectedRouter.js │ ├── tools │ │ ├── es2015-preset.js │ │ └── build.js │ ├── .eslintrc │ ├── rollup.config.js │ └── package.json ├── react-router-config │ ├── modules │ │ ├── index.js │ │ ├── __tests__ │ │ │ └── .eslintrc │ │ ├── .babelrc │ │ ├── .eslintrc │ │ ├── renderRoutes.js │ │ └── matchRoutes.js │ ├── .gitignore │ ├── tests.webpack.js │ ├── tools │ │ ├── es2015-preset.js │ │ └── build.js │ └── webpack.config.js └── react-router │ ├── .gitignore │ ├── tests.webpack.js │ ├── modules │ ├── __tests__ │ │ ├── .eslintrc │ │ ├── MemoryRouter-test.js │ │ ├── SwitchMount-test.js │ │ ├── matchPath-test.js │ │ └── withRouter-test.js │ ├── .babelrc │ ├── index.js │ ├── .eslintrc │ ├── withRouter.js │ ├── MemoryRouter.js │ ├── Redirect.js │ ├── Prompt.js │ ├── matchPath.js │ ├── Switch.js │ └── Router.js │ ├── docs │ ├── guides │ │ ├── redux.md │ │ ├── static-routes.md │ │ ├── quick-start.md │ │ └── Installation.md │ └── api │ │ ├── context.router.md │ │ ├── matchPath.md │ │ ├── match.md │ │ ├── Prompt.md │ │ ├── Redirect.md │ │ ├── Router.md │ │ ├── MemoryRouter.md │ │ ├── withRouter.md │ │ ├── StaticRouter.md │ │ ├── location.md │ │ ├── history.md │ │ └── Switch.md │ ├── tools │ ├── es2015-preset.js │ └── build.js │ ├── webpack.config.js │ └── README.md ├── .gitignore ├── lerna.json ├── .travis.yml ├── SPONSORS.md ├── package.json ├── LICENSE.md ├── ISSUE_TEMPLATE.md └── CONTRIBUTING.md /.watchmanconfig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/react-router-native/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /packages/react-router-website/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | node_modules 3 | -------------------------------------------------------------------------------- /packages/react-router-native/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"] 3 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | lerna-debug.log 3 | npm-debug.log 4 | yarn-error.log 5 | .vscode/ 6 | -------------------------------------------------------------------------------- /packages/react-router-dom/modules/Prompt.js: -------------------------------------------------------------------------------- 1 | export { Prompt as default } from 'react-router' 2 | -------------------------------------------------------------------------------- /packages/react-router-dom/modules/Route.js: -------------------------------------------------------------------------------- 1 | export { Route as default } from 'react-router' 2 | -------------------------------------------------------------------------------- /packages/react-router-dom/modules/Router.js: -------------------------------------------------------------------------------- 1 | export { Router as default } from 'react-router' 2 | -------------------------------------------------------------------------------- /packages/react-router-dom/modules/Switch.js: -------------------------------------------------------------------------------- 1 | export { Switch as default } from 'react-router' 2 | -------------------------------------------------------------------------------- /packages/react-router-dom/modules/Redirect.js: -------------------------------------------------------------------------------- 1 | export { Redirect as default } from 'react-router' 2 | -------------------------------------------------------------------------------- /packages/react-router-dom/modules/matchPath.js: -------------------------------------------------------------------------------- 1 | export { matchPath as default } from 'react-router' 2 | -------------------------------------------------------------------------------- /packages/react-router-dom/modules/MemoryRouter.js: -------------------------------------------------------------------------------- 1 | export { MemoryRouter as default } from 'react-router' 2 | -------------------------------------------------------------------------------- /packages/react-router-dom/modules/StaticRouter.js: -------------------------------------------------------------------------------- 1 | export { StaticRouter as default } from 'react-router' 2 | -------------------------------------------------------------------------------- /packages/react-router-dom/modules/withRouter.js: -------------------------------------------------------------------------------- 1 | export { withRouter as default } from 'react-router' 2 | -------------------------------------------------------------------------------- /packages/react-router-redux/.gitignore: -------------------------------------------------------------------------------- 1 | es 2 | node_modules 3 | umd 4 | test 5 | /*.js 6 | !rollup.config.js 7 | -------------------------------------------------------------------------------- /packages/react-router-native/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ReactRouterNative' 2 | 3 | include ':app' 4 | -------------------------------------------------------------------------------- /packages/react-router-config/modules/index.js: -------------------------------------------------------------------------------- 1 | export matchRoutes from './matchRoutes' 2 | export renderRoutes from './renderRoutes' 3 | -------------------------------------------------------------------------------- /packages/react-router/.gitignore: -------------------------------------------------------------------------------- 1 | es 2 | node_modules 3 | umd 4 | /*.js 5 | !karma.conf.js 6 | !tests.webpack.js 7 | !webpack.config.js 8 | -------------------------------------------------------------------------------- /packages/react-router-dom/.gitignore: -------------------------------------------------------------------------------- 1 | es 2 | node_modules 3 | umd 4 | /*.js 5 | !karma.conf.js 6 | !tests.webpack.js 7 | !webpack.config.js 8 | -------------------------------------------------------------------------------- /packages/react-router-dom/docs/api/Route.md: -------------------------------------------------------------------------------- 1 | # <Route> 2 | 3 | Re-exported from core [`Route`](../../../react-router/docs/api/Route.md) 4 | -------------------------------------------------------------------------------- /packages/react-router/tests.webpack.js: -------------------------------------------------------------------------------- 1 | var context = require.context('./modules', true, /-test\.js$/) 2 | context.keys().forEach(context) 3 | -------------------------------------------------------------------------------- /packages/react-router-config/.gitignore: -------------------------------------------------------------------------------- 1 | es 2 | node_modules 3 | umd 4 | /*.js 5 | !karma.conf.js 6 | !tests.webpack.js 7 | !webpack.config.js 8 | -------------------------------------------------------------------------------- /packages/react-router-config/tests.webpack.js: -------------------------------------------------------------------------------- 1 | var context = require.context('./modules', true, /-test\.js$/) 2 | context.keys().forEach(context) 3 | -------------------------------------------------------------------------------- /packages/react-router-dom/docs/api/Prompt.md: -------------------------------------------------------------------------------- 1 | # <Prompt> 2 | 3 | Re-exported from core [`Prompt`](../../../react-router/docs/api/Prompt.md) 4 | -------------------------------------------------------------------------------- /packages/react-router-dom/docs/api/Router.md: -------------------------------------------------------------------------------- 1 | # <Router> 2 | 3 | Re-exported from core [`Router`](../../../react-router/docs/api/Router.md) 4 | -------------------------------------------------------------------------------- /packages/react-router-dom/docs/api/Switch.md: -------------------------------------------------------------------------------- 1 | # <Switch> 2 | 3 | Re-exported from core [`Switch`](../../../react-router/docs/api/Switch.md) 4 | -------------------------------------------------------------------------------- /packages/react-router-dom/tests.webpack.js: -------------------------------------------------------------------------------- 1 | var context = require.context('./modules', true, /-test\.js$/) 2 | context.keys().forEach(context) 3 | -------------------------------------------------------------------------------- /packages/react-router-native/docs/api/Route.md: -------------------------------------------------------------------------------- 1 | # <Route> 2 | 3 | Re-exported from core [`Route`](../../../react-router/docs/api/Route.md) 4 | -------------------------------------------------------------------------------- /packages/react-router-dom/docs/api/matchPath.md: -------------------------------------------------------------------------------- 1 | # matchPath 2 | 3 | Re-exported from core [`matchPath`](../../../react-router/docs/api/matchPath.md) 4 | -------------------------------------------------------------------------------- /packages/react-router-native/docs/api/Prompt.md: -------------------------------------------------------------------------------- 1 | # <Prompt> 2 | 3 | Re-exported from core [`Prompt`](../../../react-router/docs/api/Prompt.md) 4 | -------------------------------------------------------------------------------- /packages/react-router-native/docs/api/Router.md: -------------------------------------------------------------------------------- 1 | # <Router> 2 | 3 | Re-exported from core [`Router`](../../../react-router/docs/api/Router.md) 4 | -------------------------------------------------------------------------------- /packages/react-router-native/docs/api/Switch.md: -------------------------------------------------------------------------------- 1 | # <Switch> 2 | 3 | Re-exported from core [`Switch`](../../../react-router/docs/api/Switch.md) 4 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "lerna": "3.9.0", 3 | "npmClient": "yarn", 4 | "version": "independent", 5 | "packages": [ 6 | "packages/*" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /packages/react-router-dom/docs/api/Redirect.md: -------------------------------------------------------------------------------- 1 | # <Redirect> 2 | 3 | Re-exported from core [`Redirect`](../../../react-router/docs/api/Redirect.md) 4 | -------------------------------------------------------------------------------- /packages/react-router-dom/docs/api/withRouter.md: -------------------------------------------------------------------------------- 1 | # withRouter 2 | 3 | Re-exported from core [`withRouter`](../../../react-router/docs/api/withRouter.md) 4 | -------------------------------------------------------------------------------- /packages/react-router-native/docs/api/Redirect.md: -------------------------------------------------------------------------------- 1 | # <Redirect> 2 | 3 | Re-exported from core [`Redirect`](../../../react-router/docs/api/Redirect.md) 4 | -------------------------------------------------------------------------------- /packages/react-router-native/docs/api/matchPath.md: -------------------------------------------------------------------------------- 1 | # matchPath 2 | 3 | Re-exported from core [`matchPath`](../../../react-router/docs/api/matchPath.md) 4 | -------------------------------------------------------------------------------- /packages/react-router-website/modules/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justjavac/react-router-v4-CN/HEAD/packages/react-router-website/modules/logo.png -------------------------------------------------------------------------------- /packages/react-router-native/docs/api/withRouter.md: -------------------------------------------------------------------------------- 1 | # withRouter 2 | 3 | Re-exported from core [`withRouter`](../../../react-router/docs/api/withRouter.md) 4 | -------------------------------------------------------------------------------- /packages/react-router-website/modules/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ "es2015", { "loose": true } ], 4 | "stage-1", 5 | "react" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-router-website/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justjavac/react-router-v4-CN/HEAD/packages/react-router-website/static/favicon.ico -------------------------------------------------------------------------------- /packages/react-router-native/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ReactRouterNative 3 | 4 | -------------------------------------------------------------------------------- /packages/react-router-native/ios/main.jsbundle.meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justjavac/react-router-v4-CN/HEAD/packages/react-router-native/ios/main.jsbundle.meta -------------------------------------------------------------------------------- /packages/react-router-dom/docs/api/MemoryRouter.md: -------------------------------------------------------------------------------- 1 | # <MemoryRouter> 2 | 3 | Re-exported from core [`MemoryRouter`](../../../react-router/docs/api/MemoryRouter.md) 4 | -------------------------------------------------------------------------------- /packages/react-router-dom/docs/api/StaticRouter.md: -------------------------------------------------------------------------------- 1 | # <StaticRouter> 2 | 3 | Re-exported from core [`StaticRouter`](../../../react-router/docs/api/StaticRouter.md) 4 | -------------------------------------------------------------------------------- /packages/react-router-native/docs/api/MemoryRouter.md: -------------------------------------------------------------------------------- 1 | # <MemoryRouter> 2 | 3 | Re-exported from core [`MemoryRouter`](../../../react-router/docs/api/MemoryRouter.md) 4 | -------------------------------------------------------------------------------- /packages/react-router-native/docs/api/StaticRouter.md: -------------------------------------------------------------------------------- 1 | # <StaticRouter> 2 | 3 | Re-exported from core [`StaticRouter`](../../../react-router/docs/api/StaticRouter.md) 4 | -------------------------------------------------------------------------------- /packages/react-router-website/static/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justjavac/react-router-v4-CN/HEAD/packages/react-router-website/static/favicon-16x16.png -------------------------------------------------------------------------------- /packages/react-router-website/static/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justjavac/react-router-v4-CN/HEAD/packages/react-router-website/static/favicon-32x32.png -------------------------------------------------------------------------------- /packages/react-router-website/static/react-square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justjavac/react-router-v4-CN/HEAD/packages/react-router-website/static/react-square.png -------------------------------------------------------------------------------- /packages/react-router-native/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /packages/react-router-website/static/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justjavac/react-router-v4-CN/HEAD/packages/react-router-website/static/apple-touch-icon.png -------------------------------------------------------------------------------- /packages/react-router-website/static/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justjavac/react-router-v4-CN/HEAD/packages/react-router-website/static/mstile-150x150.png -------------------------------------------------------------------------------- /packages/react-router-native/android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /packages/react-router-website/static/android-chrome-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justjavac/react-router-v4-CN/HEAD/packages/react-router-website/static/android-chrome-144x144.png -------------------------------------------------------------------------------- /packages/react-router/modules/__tests__/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "mocha": true 4 | }, 5 | rules: { 6 | "react/display-name": 0, 7 | "react/prop-types": 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/react-router-dom/modules/__tests__/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "mocha": true 4 | }, 5 | rules: { 6 | "react/display-name": 0, 7 | "react/prop-types": 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/react-router-native/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justjavac/react-router-v4-CN/HEAD/packages/react-router-native/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /packages/react-router-config/modules/__tests__/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "mocha": true 4 | }, 5 | rules: { 6 | "react/display-name": 0, 7 | "react/prop-types": 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/react-router-native/android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = 'debug', 3 | store = 'debug.keystore', 4 | properties = 'debug.keystore.properties', 5 | visibility = [ 6 | 'PUBLIC', 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /packages/react-router-native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justjavac/react-router-v4-CN/HEAD/packages/react-router-native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/react-router-native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justjavac/react-router-v4-CN/HEAD/packages/react-router-native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/react-router-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justjavac/react-router-v4-CN/HEAD/packages/react-router-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/react-router-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justjavac/react-router-v4-CN/HEAD/packages/react-router-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - stable 5 | cache: 6 | yarn: true 7 | directories: 8 | - node_modules 9 | branches: 10 | only: 11 | - master 12 | - next 13 | - /^greenkeeper-/ 14 | -------------------------------------------------------------------------------- /packages/react-router-native/index.ios.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native' 2 | 3 | import App from './examples/BasicExample' 4 | //import App from './examples/ExperimentalExample' 5 | 6 | AppRegistry.registerComponent('ReactRouterNative', () => App) 7 | -------------------------------------------------------------------------------- /packages/react-router-website/modules/index.js: -------------------------------------------------------------------------------- 1 | //import './LoadServiceWorker' 2 | import React from 'react' 3 | import ReactDOM from 'react-dom' 4 | import App from './components/App' 5 | import './base.css' 6 | 7 | ReactDOM.render(, document.getElementById('app')) 8 | -------------------------------------------------------------------------------- /packages/react-router-website/modules/Theme.js: -------------------------------------------------------------------------------- 1 | export const RED = 'hsl(0, 78%, 60%)' 2 | export const DARK_GRAY = 'hsl(0, 0%, 14.5%)' 3 | export const LIGHT_GRAY = 'hsl(0, 0%, 32%)' 4 | export const BRIGHT_GRAY = 'hsl(0, 0%, 78%)' 5 | export const SMALL_SCREEN = '(max-width: 600px)' 6 | 7 | -------------------------------------------------------------------------------- /packages/react-router-native/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/react-router-native/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip 6 | -------------------------------------------------------------------------------- /packages/react-router-redux/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "./tools/es2015-preset", 4 | "stage-1", 5 | "react" 6 | ], 7 | "env": { 8 | "production": { 9 | "plugins": [ 10 | "transform-react-remove-prop-types" 11 | ] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/react-router-website/static/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #b91d47 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/react-router-native/docs/guides/deep-linking.md: -------------------------------------------------------------------------------- 1 | # Deep Linking 2 | 3 | Before you can use `` you need to set it up in your native app configuration. Please refer to the [React Native Docs](https://facebook.github.io/react-native/docs/linking.html). 4 | 5 | We'll have a simpler guide here soon. 6 | 7 | -------------------------------------------------------------------------------- /packages/react-router-redux/modules/__tests__/__snapshots__/ConnectedRouter-test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`A with children to render 1`] = ` 4 |
5 | Test 6 |
7 | `; 8 | 9 | exports[`A with no children to render 1`] = `null`; 10 | -------------------------------------------------------------------------------- /packages/react-router-website/modules/components/SmallScreen.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Media from 'react-media' 3 | import { SMALL_SCREEN } from '../Theme' 4 | 5 | const SmallScreen = ({ children }) => ( 6 | 7 | ) 8 | 9 | export default SmallScreen 10 | -------------------------------------------------------------------------------- /packages/react-router/modules/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "../tools/es2015-preset", 4 | "stage-1", 5 | "react" 6 | ], 7 | "env": { 8 | "production": { 9 | "plugins": [ 10 | "dev-expression", 11 | "transform-react-remove-prop-types" 12 | ] 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/react-router-dom/modules/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "../tools/es2015-preset", 4 | "stage-1", 5 | "react" 6 | ], 7 | "env": { 8 | "production": { 9 | "plugins": [ 10 | "dev-expression", 11 | "transform-react-remove-prop-types" 12 | ] 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/react-router-redux/modules/index.js: -------------------------------------------------------------------------------- 1 | export ConnectedRouter from './ConnectedRouter' 2 | export { LOCATION_CHANGE, routerReducer } from './reducer' 3 | export { 4 | CALL_HISTORY_METHOD, 5 | push, replace, go, goBack, goForward, 6 | routerActions 7 | } from './actions' 8 | export routerMiddleware from './middleware' 9 | -------------------------------------------------------------------------------- /SPONSORS.md: -------------------------------------------------------------------------------- 1 | The following companies have provided sponsorship toward the development of React Router. Thank you! 2 | 3 | - [React Training](https://reacttraining.com) 4 | - [![Modus Create](http://i.imgur.com/FxzUtvl.png)](http://moduscreate.com/) 5 | - [![Instructure](http://i.imgur.com/kMZauLm.png)](https://www.instructure.com/) 6 | 7 | -------------------------------------------------------------------------------- /packages/react-router-config/modules/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "../tools/es2015-preset", 4 | "stage-1", 5 | "react" 6 | ], 7 | "env": { 8 | "production": { 9 | "plugins": [ 10 | "dev-expression", 11 | "transform-react-remove-prop-types" 12 | ] 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/react-router/docs/guides/redux.md: -------------------------------------------------------------------------------- 1 | # Redux 集成 2 | 3 | Redux 是 React 生态系统里一个重要的部分, 我们希望使 React Router 与 Redux 尽可能满足大家可以无缝的去使用两者. 4 | 5 | 在 React Router v4 中, React Router Redux 包是 Router 项目中的一个部分, 请参考它进行集成 6 | 7 | [React Router Redux](https://github.com/reacttraining/react-router/tree/master/packages/react-router-redux) 8 | 9 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-router-packages", 3 | "private": true, 4 | "scripts": { 5 | "postinstall": "lerna bootstrap --concurrency=1", 6 | "start": "cd packages/react-router-website && npm start", 7 | "test": "lerna run test" 8 | }, 9 | "devDependencies": { 10 | "lerna": "^3.9.0" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/react-router/tools/es2015-preset.js: -------------------------------------------------------------------------------- 1 | const buildPreset = require('babel-preset-es2015').buildPreset 2 | 3 | const BABEL_ENV = process.env.BABEL_ENV 4 | 5 | module.exports = { 6 | presets: [ 7 | [ buildPreset, { 8 | loose: true, 9 | modules: BABEL_ENV === 'es' ? false : 'commonjs' 10 | } ] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /packages/react-router-config/tools/es2015-preset.js: -------------------------------------------------------------------------------- 1 | const buildPreset = require('babel-preset-es2015').buildPreset 2 | 3 | const BABEL_ENV = process.env.BABEL_ENV 4 | 5 | module.exports = { 6 | presets: [ 7 | [ buildPreset, { 8 | loose: true, 9 | modules: BABEL_ENV === 'es' ? false : 'commonjs' 10 | } ] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /packages/react-router-dom/tools/es2015-preset.js: -------------------------------------------------------------------------------- 1 | const buildPreset = require('babel-preset-es2015').buildPreset 2 | 3 | const BABEL_ENV = process.env.BABEL_ENV 4 | 5 | module.exports = { 6 | presets: [ 7 | [ buildPreset, { 8 | loose: true, 9 | modules: BABEL_ENV === 'es' ? false : 'commonjs' 10 | } ] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /packages/react-router-native/main.js: -------------------------------------------------------------------------------- 1 | export * from 'react-router' 2 | import NativeRouter from './NativeRouter' 3 | import Link from './Link' 4 | import DeepLinking from './DeepLinking' 5 | import AndroidBackButton from './AndroidBackButton' 6 | 7 | export { 8 | NativeRouter, 9 | Link, 10 | DeepLinking, 11 | AndroidBackButton 12 | } 13 | -------------------------------------------------------------------------------- /packages/react-router-redux/tools/es2015-preset.js: -------------------------------------------------------------------------------- 1 | const buildPreset = require('babel-preset-es2015').buildPreset 2 | 3 | const BABEL_ENV = process.env.BABEL_ENV 4 | 5 | module.exports = { 6 | presets: [ 7 | [ buildPreset, { 8 | loose: true, 9 | modules: BABEL_ENV === 'es' ? false : 'commonjs' 10 | } ] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /packages/react-router-website/modules/components/Loading.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Block } from 'jsxstyle' 3 | 4 | const Loading = () => ( 5 | 13 | ) 14 | 15 | export default Loading 16 | -------------------------------------------------------------------------------- /packages/react-router-website/modules/components/Home/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Block } from 'jsxstyle' 3 | import Header from './Header' 4 | import Video from './Video' 5 | import Footer from '../Footer' 6 | 7 | export default () => ( 8 | 9 |
10 |