-
-
Notifications
You must be signed in to change notification settings - Fork 543
Open
Labels
Description
Describe the bug
When using a useStore to retrieve information from the form (in the example a value but it could be something else), the component renders a first time, the useEffect is triggered, then a second render is performed without useEffect and without being seen in the React profiler.
Your minimal, reproducible example
https://codesandbox.io/p/devbox/blissful-mccarthy-2nl2s2?file=%2Fsrc%2Findex.tsx%3A8%2C56
Steps to reproduce
- Open the sandbox
- Show the devTolls
- Enter
tin firstName - Looks at the logs you should see (it can be a little bit random, you can try again)
render component with useStore
useEffect of component with useStore
render component with useStore
Expected behavior
There should be only one render with one useEffect.
How often does this bug happen?
Often
Screenshots or Videos
No response
Platform
- OS: MacOs
- Browser: Chrome
- Version: 142.0.7444.60
TanStack Form adapter
react-form
TanStack Form version
1.23.8
TypeScript version
No response
Additional context
No response
romain-trotard