'How do I get the value of a react-jsonschema form using a usestate hook to save the formData without clearing the form values
I am using the onchange function that the form(https://react-jsonschema-form.readthedocs.io/en/latest/) provides to get the values but unable to save the values with my usestate hook.
<Form
schema={schema}
disabled={formattedAddresses.length < 1}
uiSchema={uiSchema}
widgets={widgets}
onSubmit={onSubmit}
onChange={(e) => {
const { formData } = e
console.log('formData', formData)
setAssetId(formData.assetId)
setFromAddress(formData.wallet)
}}
/>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
