shakacode / re-formality

Form validation tool for reason-react
https://re-formality.now.sh
MIT License
244 stars 36 forks source link

Implement a useFormContext hook #93

Closed danwetherald closed 3 years ago

danwetherald commented 3 years ago

The ability to create a Form context that can be accessed from anywhere similar to how Formik does it would be super useful.

https://formik.org/docs/api/useFormikContext

alex35mil commented 3 years ago

As per discussion on Discord, I think that props drilling is safer and enough ergonomic in Reason/ReScript, and I'd encourage preferring it over context in 99% of the cases in general. So I wouldn't increase the API and complexity of the library with this addition.

danwetherald commented 3 years ago

Totally fair, I agree with that explanation.