margelo / react-native-bignumber

🔢 The fastest Big Number library for React Native
https://margelo.io
MIT License
342 stars 12 forks source link

JSI Limitations #42

Closed kylecesmat closed 2 years ago

kylecesmat commented 2 years ago

Hello!

I'm attempting to debug an application in iOS using Chrome, and hitting a JSI error. Curious, is there any way around this?

Thinking about possibly wrapping the native class and falling back to BN.js when JSI is not enabled (debug only). Wondering if there are other solutions that have been considered?

Szymon20000 commented 2 years ago

We could do it this way. Meanwhile, you could debug it using safari (if iOS) or Flipper if you use Hermes.

kylecesmat commented 2 years ago

Thinking through this more, I think my current path forward is to just fall back to non-native BN.js w/ a warning in our application code. I'll leave it to you as the author to decide if this should be default behavior in the library.

Might be worthwhile adding the similar limitations verbiage from the mmkv module https://github.com/mrousavy/react-native-mmkv#limitations

Thanks for your quick response and a great lib! :)