-
Notifications
You must be signed in to change notification settings - Fork 375
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
[Feature] Request to support "React Native Web" #1390
Comments
@hyochan Thanks for the feature request, we will consider adding support for "React Native Web". We also do have an SDK for "React" (AKA React.js or ReactJS) called react-onesignal. While not as nice has having one library and API wanted to point it out as an easy way to still integrate OneSignal on your website today. |
@jkasten2 It would be really awesome to see the rest of the ecosystem support this universal approach, having web + native support in a single library,as well. That could safe lots of development effort. |
Heey, How did you fix this in the end. Implement both ways and just ignore the react-native error when used in web? |
That would have been awesome. We did implement both react native and web version of another library due to no react native web support, and it was tiresome. A lot of platform checks splitting up into, native.tsx files and so on to avoid it becoming a problem. But at least you guys handle it gracefully, some libraries crash on the web when there is no support. Get away with an error in the console here. |
Description:
These days, web support for React Native is good enough to land in production. I think it'd be nice if onesignal react-native supports web.
Environment
React Native Web
^0.17.7
Steps to Reproduce Issue:
import OneSignal from 'react-native-onesignal';
in web.Anything else:
Here is the screenshot running in expo web.
The text was updated successfully, but these errors were encountered: