Expose input cache hook to track value after unregister #3470
-
I was implementing a form which required an input to show/hide depending on the state of another input (in this case a checkbox). Looking at the docs, I read that the form doesn't track inputs after they unregister. The two sets of behaviours from I built a hook to fit my use case (it's pretty naive in how it detects the mount/unmount events) which seems to allow this behaviour - here's a simple example of it. Would it make sense to include this hook as part of the library? Would love to hear your thoughts. Awesome library by the way, thank you for all your hard work! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
hey @lfarrel6 sorry about the late reply, I have saved in my bookmark and forgot to reply. your custom hook is pretty smart! I think let's keep it at your end for now, but would you like to send a PR with this as an example (our /examples folder). |
Beta Was this translation helpful? Give feedback.
hey @lfarrel6 sorry about the late reply, I have saved in my bookmark and forgot to reply. your custom hook is pretty smart! I think let's keep it at your end for now, but would you like to send a PR with this as an example (our /examples folder).