[JS] New 'react-native init'
See original GitHub issue‘react-native init’ should have an option where it creates a small app for you, using best practices. Right now ‘react-native init’ creates an “app” for you which is useless. I have to go and read lots of documentation and tutorials to figure out how to do completely basic things like navigation and state management. We have a great opportunity to make ‘init’ create something useful.
The new template would be a small app that includes Navigation, one screen with a ListView that renders JSON data fetched from a HTTP endpoint, and Redux for state management. It should also include tests.
We should include a basic local node server that serves the data and stores updates in memory, so that you can do ‘init’, run and see the whole thing working end-to-end.
For this, previous experience with building RN apps is essential.
You can implement this in steps, by first implementing a subset:
react-native init --navigation
creates an app with aListView
with static hardcoded items, tapping an item takes you to a screen representing that itemreact-native init --redux
creates an similar to the above, plus uses Redux for data management, and also allows editing the data via the detail screen. For this there should be a small local node server included that the user can start with a simple command.
See the discussion: https://www.facebook.com/groups/reactnativeoss/permalink/1558844321078863
This might be a good writeup to look at: https://medium.com/@dabit3/first-look-react-native-navigator-experimental-9a7cf39a615b#.656joiyks
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:16 (14 by maintainers)
Please do this without using Yeoman generators. We want to remove Yeoman from the tree because it has too many dependencies.
@ericvicenti The whole Navigation scene in React Native right now is a mess. We’ve got Navigator which is being deprecated support wise, and NavigatorIOS which is maintained by the community, and I believe will also come deprecated once NavigatorExperimental comes out (or will it?).
With your above comment it just adds to the confusion/mess. If one part of NavigatorExperimental will be maintained by Facebook and one part by the community, won’t we have just another Navigation solution which sorts of works - but isn’t great since it might not be kept up-to-date by the community?
In my opinion, we need a single Navigation solution which is fully supported with great documentation - right now every time I see/deal with a RN app navigation feels like a hack to get it implemented.