Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.1.0 #4

Merged
merged 33 commits into from
Nov 5, 2021
Merged

Version 0.1.0 #4

merged 33 commits into from
Nov 5, 2021

Conversation

nikhilag
Copy link
Contributor

@nikhilag nikhilag commented Oct 7, 2021

This is a major milestone for this form library for handling complex form requirements with ease. Here's a quick overview of what was changed:-

  • Using new features of recoil 0.4.1 to do transactions to allow multiple atoms to be updated safely and together
  • Got rid of snapshots wherever possible to improve performance. In some places, useRecoilCallback still needs to be used because useRecoilTransaction doesn't allow returning data.
  • Allow any level of nesting with help of optional ancestors for fields for field arrays. Note that only field arrays can be ancestors of fields. This means everything is now handled recursively since a field or field array can have as many ancestors.
  • Code refactoring.
  • Switched to useEffect in individual atom instead of relying on atom naming to figure out how to construct the final object. Also to allow multiple forms to work together, formId is generated internally. There's still room for improvement here but overall a step in the right direction.
  • Support for defaultValue in useFieldArray
  • Initial support for react native

dev-rishi-witbybit and others added 29 commits August 31, 2021 13:29
- Introduce fieldArrayName, index as optional parameters to be used with useField() inside field array
- Use matchAll from core-js
- Delete Controller since there is no use case currently. Compatibility with other form libraries can be explored in near future
Note that Recoil setters have been added as dependencies for useEffect or useCallback - facebookexperimental/Recoil#472
@github-actions
Copy link

github-actions bot commented Oct 7, 2021

size-limit report 📦

Path Size
dist/react-recoil-form.cjs.production.min.js 11.67 KB (+132.8% 🔺)
dist/react-recoil-form.esm.js 11.76 KB (+128.56% 🔺)

@nikhilag nikhilag merged commit 3d49831 into main Nov 5, 2021
@nikhilag nikhilag deleted the multiple-ancestors branch November 5, 2021 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants