Open chriscoomber opened 2 years ago
Looks like you can get around the crypto error with:
import 'react-native-get-random-values'; // Polyfill for crypto library on native.
(and obviously add that package to your package.json) above your import for this package. Otherwise, it seems to be fine with targeting @rjsf/core (^4.0.0)
Issue
Currently, this package depends on "@rjsf/core": "^2.0.0". However this is a very old version, and has scary warnings about peer dependencies like:
Discussion
It would be good to support the latest version of @rjsf/core.
I feel like this might be a relatively small fix, because from testing against @rjsf/core ^4.0.0, I only get crashes on react-native when my schema uses arrays. Specifically I see:
So probably @rjsf/core has added a new ArrayField that we need to provide a react-native alternative for (I'm not an expert on how this package works).
Aside: I realise that this is a very niche library that's not actively maintained, so if anyone reading this can point me to an alternative, that would be very useful. I took a look at https://github.com/CareLuLu/react-native-web-jsonschema-form but had trouble getting it working.