Skip to content

Understanding "react jsonschema form" in 2 minutes

Charly POLY edited this page Jun 8, 2018 · 4 revisions

react-jsonschema-form is a awesome library developed by Mozilla.

Since, react-apollo-form is a "wrapper" around react-jsonschema-form,

you'll need to understand the basics of the wrapped library to start building some forms.


JSON Schema

JSON schema is just a standard based on JSON format to describe data.

Please take a look to "Understanding JSON Schema" in order to understand it fully.


Architecture overview

Given a JSON Schema, react-jsonschema-form will iterate over the properties and render them.

Here's how:

  • templates are base renderers
  • then fields, specific to each data types are rendered
  • if provided (in "ui:widget"), the field will forward rendering to a widget

https://s3.eu-west-2.amazonaws.com/github-oss/react-apollo-form/react-jsonschema-form.png