Game-X-Coin / eosjs-rn

General purpose library for the EOS blockchain.
http://eosio.github.io/eosjs
MIT License
18 stars 5 forks source link

why can eosjs run in node and browser, yet cannot run in react native? #7

Closed jadertao closed 5 years ago

jadertao commented 5 years ago

I know eosjs(especially ecc module) need some node built-in modules. but now that in some easy way it can run in web browser. why can't we use its browser version in react native? so my question is

  1. what happened during eosjs node version's changing to browser version?
  2. why browser version is not runnable in react native? many thanks if you can tell me.
jadertao commented 5 years ago

my guess: it is because we get the browser version by browserify. And the output of browserify cannot run in reactnative. like: https://stackoverflow.com/questions/40777337/how-to-use-browserified-libraries-in-react-native

indiev commented 5 years ago

This is because the browserify provided by current eosjs version is incompatible with react native. In order to operate in react native, other work is required like custom transformers