Hi all,
I’m using json forms version 3.0 alpha and i’m trying to implement a webapp that has two different pages that each use a different schema.
I have a generic page component which is essentially just a wrapper for the JsonForms component e.g.
<div>
<ErrorHeader errors={ajvErrors}/>
<div className={classes.root}>
<JsonForms
schema={props.schema}
data={props.data}
uischema={props.uischema}
renderers={props.renderers}
cells={props.cells}
onChange={({data, errors}) => onChange(data, errors)}
ajv={ajv}
></JsonForms>
</div>
</div>
I have two instances of this component and each has it’s own Route and it’s own schema. The ajv is something I define as static in my App.tsx.
One of the issues that i’m facing is that if I switch between my two pages and then switch back I get an error saying that the schema with the given id is already registered. I’ve managed to work around this issue by having a new instance of an ajv created each time my JsonForms wrapper component is run which happens every time I switch page however I’m wondering if there is a better way to deal with this situation?
Thanks in advance