While using this package in our react project, we needed to access the current value of one of the fields in the form, to use that to update the possible values in another field (select).
The problem is that we have the eslint-plugin-react-compiler plugin, which does not accept the form.useStore hook with the exception "Hooks must be the same function on every render, but this value may change over time to a different function.".
The UI works as expected, but it seems like the way of accessing the current value in a reactive manor is not correct according to the rules for hooks.
I added a fork of this repo, where I have added the eslint plugin. The eslint check of the useForm file fails.
Describe the bug
While using this package in our react project, we needed to access the current value of one of the fields in the form, to use that to update the possible values in another field (select).
The problem is that we have the eslint-plugin-react-compiler plugin, which does not accept the
form.useStore
hook with the exception "Hooks must be the same function on every render, but this value may change over time to a different function.".The UI works as expected, but it seems like the way of accessing the current value in a reactive manor is not correct according to the rules for hooks.
I added a fork of this repo, where I have added the eslint plugin. The eslint check of the useForm file fails.
Your minimal, reproducible example
https://github.com/Axenu/tanstack-form/tree/react-compiler
Steps to reproduce
Expected behavior
There should not be any lint errors when using form.useStore
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
MacOS, eslint
TanStack Form adapter
None
TanStack Form version
0.36.2
TypeScript version
No response
Additional context
No response