Closed devnomic closed 1 year ago
Sorry for the inconvenience. v0.1.0 is already migrated Jotai v2 API (because we can use the prerelease in jotai v1). In your case, please use v0.0.4 until jotai v2 is released.
npm install jotai-form@0.0.4
I see thank you, however it produce another typing error when checking isValid like in the example.
Can you create a minimal reproduction with https://codesandbox.io/s/react-typescript-react-ts ?
Here it is: https://codesandbox.io/s/ecstatic-paper-op43j5?file=/src/App.tsx
Sorry for long time. I really like jotai, i think it's the best!
Thanks.
Because it's an async validation, it can be in progress. You need to check isValidating
property.
https://codesandbox.io/s/charming-moon-1vycuk
I see, thank you @dai-shi. It seems the readme basic example needs update then, since i just copy pasted the code from the readme.
Good point.
Would you be willing to open a PR?
Confirmed that examples/02 seems correct: https://github.com/jotai-labs/jotai-form/blob/b52543d8ffedc17ebbb219d854a5aa1f247b8f95/examples/02_typescript/src/App.tsx#L29-L31
I wanted to try this lib with latest jotai lib however it produce typing error.
I literally followed the example in the readme.