-
Notifications
You must be signed in to change notification settings - Fork 42
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 Guide/Example #628
Comments
+1 this would be awesome |
also +1 - we would really like to be able to use js-waku in our mobile app and just realized there are incompatibilities with libp2p dependencies. @jrmeurer can help test any potential solutions. |
I believe that #337 needs to be done first, especially removal of polyfills. I want to check that next week. |
|
React Native typically does not allow node modules. I'm not sure what would be needed to enable libp2p or other deps within React Native. |
Yes, a dependency broke their API on patch version. Should be fixed with |
Now: Same error we had with @noble/ed25519 library. We were not able to resolve this with either polyfills or babel configs. |
Thanks @jrmeurer. I believe @jemboh has reached the same error. I wonder if adding a shim.js to js-waku could be a solution, as described here: facebook/react-native#28492 (comment) It means changing js-waku of course. Is that something you already tried? FYI @jemboh, I think we should try this next, WDYT? ps: Such a shim could also help with #358 without needing lib consumer to update their |
Shim in js-waku could be a good idea. I haven't tried this yet - we have a massive deadline in 1 month, so a bit distracted. |
@jrmeurer I've been working on this and have come across the same issue with the I'm going to look in to a shim in Any extra things you might have seen along the way, please feel free to raise a PR or an issue in that repo so we can keep each other updated on our progress. Thanks for all your help and work so far! 🤝 |
It may make more sense to use a native module based on go-waku. See https://discord.com/channels/864066763682218004/865466694554484738/971941000333393960: Publish a native module would mean:
|
For now we are focusing effort on publishing a native module using go-waku. We are still open to making js-waku work in react-native but not clear how this can be achieved: https://discord.com/channels/864066763682218004/865466694554484738/977027312782573578 |
Waku is now available for react-native platforms via a go-waku native module: https://discord.com/channels/864066763682218004/957040003593154571/981324886679113808
Join Discord and give us some feedback. Here are my latest thoughts on js-waku in react native: https://discord.com/channels/864066763682218004/865466694554484738/977027312782573578
I am currently changing to rollup that supports the |
Incredible work, friends. 💪 |
Supported by whom? Webpack support does not seem to be out of the box. |
It wouldn't be Webpack... I'm not entirely sure. |
#802 should hopefully help with that. |
Let's park it as https://github.com/waku-org/waku-react-native is available. Should now work as the issues are fixed:
Can be reviewed if a platform wants to use the same SDK for Browser and React Native. |
Bringing it back to discuss potential work on the topic as it is asked by people who want to use cc @waku-org/js-waku-developers @fryorcraken If we don't plan to enable it and repo https://github.com/waku-org/waku-react-native is not working then we need to deprecate it and update README + docs to prevent people from spending time on unnecessary things |
Not sure if this is the best place to comment but I am currently leading an effort to do this for js-libp2p which would be required at a minimum to utilize it in js-waku, I can't speak to what further lift would be required after that as I am not so familiar with js-waku's codebase. |
Cool! For now this particular issue is too unclear an may or may not be connected to your efforts. |
cc @b4s36t4 |
Decoupling important part of this task into #1743 The example part is probably better to shape into |
Some progress on react-native compatibility for js-libp2p - libp2p/js-libp2p#2136 (comment) |
super cool! imo we should prioritize the react-native SDK effort with js-waku cc @waku-org/js-waku-developers @hackyguru @chair28980 |
Adding a reference to @maschad example https://github.com/ipfs-shipyard/js-libp2p-react-native |
What is done - pollyfills are provided - #1915 Moving to TODO for now. |
Work in this should be paused for now. |
I moved it into TODO because of that. Do you think we move to Icebox? |
I'd say icebox as it's not in the roadmap :) |
This is a feature or change request
Problem
It is currently not possible to use js-waku in react-native. Probably because of the polyfills.Should probably work now.
Definition of Done
Provide guide and example of using js-waku in React native. Update readme to clarify which implementations support react-native.
The text was updated successfully, but these errors were encountered: