diff --git a/Example/package.json b/Example/package.json index f724f1d6a..042f8b436 100644 --- a/Example/package.json +++ b/Example/package.json @@ -8,7 +8,7 @@ "dependencies": { "react-native": "^0.19.0", "react-native-button": "^1.2.1", - "react-native-router-flux": "^2.2.5", + "react-native-router-flux": "^2.2.7", "react-native-modalbox": "^1.3.0", "react-redux": "^4.4.0", "redux": "^3.3.1" diff --git a/ReactRouter.js b/ReactRouter.js deleted file mode 100644 index f24ab2166..000000000 --- a/ReactRouter.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (c) 2015-present, Pavel Aksonov - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - * - */ - -import React from 'react-native' -import Router from './Router'; -import ExRouter from './ExRouter'; -const {StyleSheet, View} = React; -import debug from './debug'; -import Actions from './Actions'; -export default class extends React.Component { - - constructor(props){ - super(props); - const createRouter = props.createRouter || this.createRouter; - this.router = createRouter(props); - } - - createRouter(props){ - const schemas = React.Children.map(props.children, child=>child).filter(child=>child.type.prototype.className() === "Schema").map(child=>child.props); - const routes = React.Children.map(props.children, child=>child).filter(child=>child.type.prototype.className() === "Route").map(child=>child.props); - return new Router(routes, schemas, props.initialRoutes || (props.initial && [props.initial]), props); - } - - componentDidMount(){ - this.router.delegate = this.refs.router; - } - - render(){ - const Component = this.props.router || ExRouter; - return (); - } -} diff --git a/package.json b/package.json index 311b2913b..0b5a6de0b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-router-flux", - "version": "2.2.6", + "version": "2.2.7", "description": "React Native Router using Flux architecture", "repository": { "type": "git",