Currently, we have an installer package that resolves the correct version of react-native-windows
called rnpm-plugin-windows
. We should consider dropping a proposal in React Native Community Discussions & Proposals to make a unified mechanism for adding platforms to a React Native project. E.g., today we require a CLI extension to install react-native-windows
called rnpm-plugin-windows
, but it would feel like a much more seamless experience if there was already a builtin tool for adding platforms to a React Native app.
E.g., if we had something like:
react-native add-platform <platform>
Which did the following:
react-native-<platform>@latest
react-native-<platform>
to a package that is compatible with the currently installed version of React Native)cc @vincentriemer in case he has considered this before for react-native-dom
.
FYI - I found a relevant proposal in React Native Community Discussions & Proposals and updated it with more details about this:
https://github.com/react-native-community/discussions-and-proposals/issues/50
I love this idea! Working towards making all platforms equal (aka not included by default, adding the ones the dev wants through an simple process like the proposed command) definitely seems like something worth working towards.
Related: #2133
Really, we just want some way to integrate into the init
process up front, either via a prompt or a built-in option. Adding on after the fact would be less desirable but better than what we have.
With @asklar 's change to the react-native-cli that now prompts for adding windows and macOS after init command, we are slightly better off. I do agree that the end goal is to add-platform for all platforms. However, the right space to discuss this is in the linked issue since this is about the CLI + all platforms and we are probably a little ways off from being in the fully platform agnostic slim core before we can make this happen.
Closing this issue so we can continue the conversation on the discussions and proposals repo.
Most helpful comment
Related: #2133
Really, we just want some way to integrate into the
init
process up front, either via a prompt or a built-in option. Adding on after the fact would be less desirable but better than what we have.