react-native-community / directory

A searchable and filterable directory of React Native libraries.
https://reactnative.directory
MIT License
916 stars 439 forks source link

jsonform / react-jsonschema-form (Dynamic Forms from JSON Schema) #998

Open Nezteb opened 1 year ago

Nezteb commented 1 year ago

I've got a project with a Postgres table with a JSONB column. In this column, there is a JSON Schema for an item/asset/widget. I want to dynamically generate React Native forms for these JSON Schema.

Libraries that do this:

Looking at Expo's package compatibility docs: https://docs.expo.dev/workflow/using-libraries/#determining-third-party-library-compatibility

Now check the following:

  • Does it include an ios and/or android/ directory?
    • No.
  • Does the README mention linking?
    • No.
  • Is it built specifically for Node.js, the web, electron, or another platform?
    • Unsure?
      • jsonform says "The JSON Form library is a JavaScript client-side library...".
      • react-jsonschema-form says "A simple React component capable of building HTML forms...".

I checked the React Native directory and couldn't find anything: https://reactnative.directory/?expo=true&search=json

Simek commented 1 year ago

Hello @Nezteb, let's start from the beginning. In general, React libraries cannot be used directly with React Native.

The Expo docs you refer to explains how to check if React Native package is compatible with Expo Go (this is also what's the label in the directory means). Every React Native library can be used with Expo leveraging Dev Client feature - https://docs.expo.dev/develop/development-builds/introduction/.

ATM, in directory, we do not have listed any React Native library which could help achieve what you want to, but I was able to find a project on GitHub which might help you:

Will also add it to the directory listing soon.