question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[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 a ListView with static hardcoded items, tapping an item takes you to a screen representing that item
  • react-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:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:16 (14 by maintainers)

github_iconTop GitHub Comments

3reactions
mkonicekcommented, Jun 17, 2016

Please do this without using Yeoman generators. We want to remove Yeoman from the tree because it has too many dependencies.

2reactions
Ehespcommented, Jun 18, 2016

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting up the development environment - React Native
Run the following command to create a new React Native project called "AwesomeProject": npm; Yarn. npx create-expo-app AwesomeProject
Read more >
How to initialize React Native project - Stack Overflow
First Create a Folder on your any drive then navigate to that folder from command prompt/ terminal the fire command react-native init ( ......
Read more >
cli/init.md at main · react-native-community/cli - GitHub
There are couple of ways to initialize new React Native projects. ... needs to have configuration file called template.config.js in the root of...
Read more >
Creating your first React Native project - Techiediaries
In this tutorial, we'll teach you to build your first React Native mobile app from scratch going through the essential concepts.
Read more >
React Native - Environment Setup - Tutorialspoint
React Native - Environment Setup · Step 1: Install create-react-native-app · Step 2: Create project · Step 3: NodeJS Python Jdk8 · Step...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found