From 352fd96e53a5ac4fed24af38e0dba1f06f7fd01a Mon Sep 17 00:00:00 2001 From: hasparus Date: Fri, 13 Apr 2018 18:55:26 +0200 Subject: [PATCH] Remove duplicate routes declaration. Import common component. --- templates/re-start/App.js | 23 +---------------------- templates/re-start/src/Main.js | 22 ++++++++++++++++++++++ templates/re-start/src/index.js | 22 ++-------------------- 3 files changed, 25 insertions(+), 42 deletions(-) create mode 100644 templates/re-start/src/Main.js diff --git a/templates/re-start/App.js b/templates/re-start/App.js index a6ecffe..17917cb 100644 --- a/templates/re-start/App.js +++ b/templates/re-start/App.js @@ -1,22 +1 @@ -import React from 'react'; -import {Provider} from "react-redux"; -import store from "./src/utilities/storage/store"; -import TopLevelComponent from './src/screens/EntryScreen'; -import Routing, {Router} from './src/utilities/routing/index'; - -const Route = Routing.Route; - - -class App extends React.Component { - render() { - return ( - - - - - - ); - } -} - -export default App; +export { default } from './src/Main'; diff --git a/templates/re-start/src/Main.js b/templates/re-start/src/Main.js new file mode 100644 index 0000000..a56160a --- /dev/null +++ b/templates/re-start/src/Main.js @@ -0,0 +1,22 @@ +import React from 'react'; +import {Provider} from "react-redux"; + +import store from "./utilities/storage/store"; +import TopLevelComponent from './screens/EntryScreen'; +import Routing, {Router} from './utilities/routing/index'; + +const Route = Routing.Route; + +class Main extends React.Component { + render() { + return ( + + + + + + ); + } +} + +export default Main; diff --git a/templates/re-start/src/index.js b/templates/re-start/src/index.js index 92e9d69..9d2c48e 100644 --- a/templates/re-start/src/index.js +++ b/templates/re-start/src/index.js @@ -1,23 +1,5 @@ -import React from 'react'; -import {Provider} from "react-redux"; import ReactNative from 'react-native' -import store from "./utilities/storage/store"; -import TopLevelComponent from './screens/EntryScreen'; -import Routing, {Router} from './utilities/routing/index'; -const Route = Routing.Route; +import Main from './Main'; - -class App extends React.Component { - render() { - return ( - - - - - - ); - } -} - -ReactNative.render(, document.getElementById('root')); \ No newline at end of file +ReactNative.render(
, document.getElementById('root'));