-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Support Expo Config Plugins in React Native apps #637
RFC: Support Expo Config Plugins in React Native apps #637
Conversation
* wip: motivation * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md * Update 0000-implement-config-plugins.md
I think that's a really good idea. for the longest time I've been thinking/trying to add xcodegen to RN for the app template, so that the upgrades can be simplified. i have not finished it yet, and I'm sad about that, but with this rfc I like the fact that this project generation can be common with expo. prebuild is in my opinion one of the best parts of expo, and the configs on top make it even better, do having those in RN too would be great. I'm all for this 👍. |
i have lots of thoughts about this, but i think the highest order bit is: what is the issue with using the
|
Hi @brentvatne, thanks for your comment. Adding Expo to an existing project is an obvious alternative that I didn’t include in the RFC, thanks for pointing that out, will add it soon. Expo prebuild works in majority of cases. However, it generates native code with RN version that depends on Expo release cycle. I think it is a very good solution, but we were thinking more of something that could go beyond that. I see a big potential in the I’m really excited about opening up the We’re also trying to discover how does this RFC relates to more advanced setups, like using alternative bundlers or brownfield development. I will try to keep everyone up to date with that once we have any outcome. Our main goal here is to end up with a great upgrading experience for vast majority of RN users. We’re open to any kind of feedback, and even if our proposal turns out to be wrong, it’s a great opportunity to get all the parties involved and decide which way to go from there. |
Reminds me of the the old days of Cordova. Both platforms could be spun up& down easily by running |
I love the proposal. It is a very convenient way to facilitate the update process, which is one of the most commonly reported pain points of working with the framework. Nevertheless, I would like to know about the hybrid/brownfield app perspective. If I understand it well, in such a case, you will most likely need to opt-out of using the plugin system/config generation. To be more specific, I'd like to find answers to the following questions:
|
The RFC has been incredibly valuable for driving a lot of discussion between Meta, Callstack and Expo that wouldn’t have occurred without this work. We were fortunate to attend App.js and discuss the implications of this proposal with everyone in person. Our position is that this is a framework concern and not something the React Native platform should be dealing with. We’re going to publish a post about where we see the boundaries between platforms and frameworks. Expo prebuilds is an excellent solution for many developers who want to build applications with React Native. A large number of developers don’t have a need for an Android or iOS project folder and benefit from only generating these files at build time. Expo have done great work here to simplify this for their framework. The feedback from Brent is correct, developers can use prebuilds for non-Expo projects and they’ve provided docs with those details. We recommend people explore using this approach if it’s viable for their specific needs. Stepping back from the concrete proposal in the RFC, there’s still a lot of value for fleshing this out as a framework contribution (possibly with supporting changes in the platform). React Native brownfield applications don’t have good solutions for upgrading their extensions in lockstep with React Native. We’ve received a lot of feedback from larger enterprise teams to this effect. Specifically teams that are unable to move large mobile applications completely to a framework like Expo. We would be very interested to see how far an approach that fits well with these types of projects can go. Ideally it’d be easy to upstream back into any React Native framework’s tooling. This is a hard problem which is complimentary to existing framework solutions to the “upgrade problems” of React Native. |
Hi @michalchudziak @blakef, thanks for your feedback. Happy the RFC brought some discussion around. I think the brownfield is an in interesting one. I can see some potential in utilizing already existing mods to automate some steps described in Integration with Existing Apps and when upgrading RN. The main problems I see here are:
If possible, we could try building some additional config around it to handle more complicated cases. Additionally it could help developers easily handle any conflicts e.g. mismatching dependencies versions etc. Would love to hear more about problems the teams are facing with brownfield upgrade process to have a better understanding of this area |
This RFC introduces the idea of upstreaming part of Expo Config Plugins into the React Native core, which can then be consumed by RN CLI, Expo, and others. We want Config Plugins to become a standard for building and configuring native parts of the apps across the React Native ecosystem.
Rendered RFC can be found here