United init command for both React and React Native
I myself is used to the command react-native init AwesomeProject for creating React Native projects, and now create-react-app brings up a new command create-react-app my-app for creating React DOM projects. I wonder what's the reasons for the two different command, and I see the differences as follows:
- CLI tool name:
create-react-appv.s.react-native-cli - command it self: one including
initand one not - dev process:
create-react-appuses npm scripts whilereact-nativeuses custom ones likereact-native run-ios
Is it possible in the future to unite these two CLI tools and create a united one for all React related init process, which can be used for rendering to ios, Android, DOM, and can be customize by developer, who, for example, wants one for creating React apps that render to SVG?
I love this idea and I feel like it is possible. It's unclear to me what the right next step is. I think for it to be valuable to share CLI tools between React and React Native, it has to work to share application code. Some bridging layer like https://github.com/necolas/react-native-web could work but AFAIK nobody has used that to build an entire app yet. I think that needs to happen before best practices can develop here.
It'd be awesome to have a combined CLI! @vjeux @mkonicek probably have some input here?
Agree with what @lacker said.
This will probably make sense if we integrate something like React Native Web. Even in that case there are many questions (why are there two tools but not one? why do they have such different build pipelines? if I want to reuse app level code which one should I use to create the project? etc)
So I think it’s nice to keep this in mind, but it’s not something on our plates for the next several months at least.
I’ll close because this is not actionable for us right now. We might revisit it some time in the future.