-
Notifications
You must be signed in to change notification settings - Fork 93
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
react-native-web support #812
Comments
I've had a few people ask me about this in the past and my answer has always been "sure, why not". But reality is that I am not familiar with If this is something that you have strong opinions about, would you be up for contributing web support? |
We would be very interested to have Web support for RN WebGPU and Skia |
It is possible to do this on the side with vite or similar support as Mathieu mentions but it seems just adding support directly for react-native-web should be "The Way", as this is "react-native-test-app", not "react-test-app" - we want to test all the react-native platforms, not test react on all the bundlers and such. react-native-web uses webpack which gets mediocre sentiment scores in state of JS survey but is obviously widely adopted and known, and (most importantly) webpack is just built in to react-native-web as it's default choice, so we can delegate the "adults disagree" arguments to react-native-web and say "they chose it, we use what they chose" So, just confirming the "sure, why not" stance, though not committing to doing a PR or any timeline, web support just using react-native-web and all of it's current tech stack choices: would that be of interest + on track for merge? |
If this is really what one would expect if you were to set up a project with The only thing I want to add is would you be willing to own this part? As I've mentioned above, we do not use this internally. If something breaks, it is unlikely that we will ever notice it. |
Agreed 100% on not being "odd", and that is the basis of my thinking, "let's just do it exactly like react-native-web does it". In fact, if any of the details I posted in my "would this work?" comment above are opposite for how react-native-web already directs you to do it in their docs, I'll switch immediately to just doing what they do. KISS principle, basically, no desire to trailblaze here I did do some research before posting my comment, and I'll mention one other conditional branch that would direct my work effort here: if react-native-web is agnostic in the area of choosing webpack or next.js or vite or metro whatever, my research indicated that no choice will make everyone happy, but that Vite has largest mindshare currently while being simplest. At same time, Expo uses metro with web support. So I'd have to think carefully there but probably go with a Plan B of metro for it's Expo-related react-native ecosystem presence, with a Plan C of Vite. A truly excellent outcome if possible would be for the bundler to be configurable here, but that might just be a dream. I'd be willing to own it at least at the start (which for me, historically means like year+ - I commit and de-commit pretty slowly), so should be a stable experience. Ideally I can get some CI set up for you though so it will be noticeable if it breaks, even if it's just me maintaining this bit, right? You guys are great to collaborate in my experience so should work out |
Yes, this! We should be able to point people at the official documentation. Differences should be earned.
CI will definitely be mandatory regardless. I'm a bit concerned about what comes after your commitment is up. I'm under no illusion that anyone will be able to support this for practically forever. But in the worst case, if something happens and it becomes unmaintained, I won't be able to support it. In the best case, it will limp along with no meaningful changes and the occasional breaks that might take a while to address. Worst case, I will probably just axe it. In which case, what would that mean for the current users? Maybe I just worry about nothing and everything will be fine. Somewhat related, I opened this issue with the intent to make it possible to provide out-of-tree platform support so that people can provide their own platform without having to contribute directly in this repo: #2211 Hopefully, after this lands, it means that people can use |
#2211 is exactly what I thought as you reiterated your concern above about maintenance |
Yes, I'm mostly thinking about removing RNTA, the repository, as a bottleneck for adding new platforms and enable platforms that are not ready to be unveiled to the public. A nice side-effect of that is that we also minimize the risks. In this world, the current set of platforms (i.e. Android, iOS, macOS, visionOS and Windows) will still live in-repo and be maintained by us. |
Proposal
Hi 👋
I'm currently targetting the web for some react-native libraries (ex:
react-native-localize
).It could be nice to add support for react-native-web, as it's well used.
Alternatives
Using
react-native-test-app
+ keeping apackage.json
with a bundler (vite
?webpack
?)Implementation Details
vite
to the projectAdditional Context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: