Name Last Update
..
android Loading commit data...
ios Loading commit data...
src Loading commit data...
.babelrc Loading commit data...
.buckconfig Loading commit data...
.flowconfig Loading commit data...
.gitattributes Loading commit data...
.watchmanconfig Loading commit data...
README.md Loading commit data...
app.json Loading commit data...
index.js Loading commit data...
package.json Loading commit data...
shim.js Loading commit data...

Gun on react-native!


running the demo

  1. do yarn install on the directory of the demo examples/react-native
  2. run the demo with react-native run-ios or react-native run-android

debugging

i would recommend using react-native-debugger but you can use chrome's debugger as well

  • ios: cmd+D then Debug JS Remotely
  • android: cmd+M then Debug JS Remotely

now you have access to the gun globals on the console which are gun -> the root gun

user -> the gun user

how it all of this is done

since react-native doesnt provide the crypto module that we desire the most and all of the packages are incompatible with react-native/sea, and so to get sea.js working we use a webview(react-native browser) and bridge the crypto module from that browser to the global window and thats exactly what webview-crypto does, thanks to webview-crypto repo, the webview-crypto provided in this repo is somewhat the same but modified to get it working and mostly compatible with sea/react-native (even though there is a polyfiller for that but it just doesnt work ;/).