mirror of
https://github.com/zhigang1992/react-native-routy.git
synced 2026-01-12 08:23:44 +08:00
Fix type
This commit is contained in:
8
index.js
8
index.js
@@ -6,6 +6,8 @@ import Route from './src/Route'
|
||||
import * as actions from './src/action'
|
||||
import reducer from './src/reducer'
|
||||
|
||||
export const actions = actions
|
||||
export const reducer = reducer
|
||||
export const Route = Route
|
||||
export {
|
||||
actions,
|
||||
reducer,
|
||||
Route
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import { Component, Element } from 'react'
|
||||
import React, { Component, Element } from 'react'
|
||||
import { Navigator, BackAndroid } from 'react-native'
|
||||
import { connect } from 'react-redux'
|
||||
import _ from 'lodash'
|
||||
@@ -73,13 +73,12 @@ class Router extends Component {
|
||||
|
||||
const mapProps = (store, props) => {
|
||||
const mountPoint = props.routyMountPoint || 'routes'
|
||||
const routes = store[mountPoint]
|
||||
const routesMap = store[mountPoint]
|
||||
const routes = props.routyGroup != null ? routesMap[props.routyGroup] : routesMap
|
||||
if (routes == null) {
|
||||
console.error(`No routes found in ${mountPoint}`)
|
||||
}
|
||||
return {
|
||||
routes: routes[props.routyGroup]
|
||||
}
|
||||
return { routes }
|
||||
}
|
||||
|
||||
const mapAction = (dispatch, props) => {
|
||||
|
||||
Reference in New Issue
Block a user