ref
for values, that doesn't cause re-render?
#1651
-
I'm finding that if I modify a field, the below useEffect(() => console.log(form.state.values), [form.state.values]) is there a value I can use that doesn't cause a re-render? i.e. something like const currentValuesRef = useRef(form.state.values) |
Beta Was this translation helpful? Give feedback.
Answered by
LeCarbonator
Aug 2, 2025
Replies: 1 comment 5 replies
-
If all you need is the current state of the values that doesn't cause a rerender, then why not access the values when you need them? What do you plan to use the ref for? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@marc-at-brightnight Well, you probably need to add
form
to the dependency array just for safety, but that's a stable reference. Does biome keep complaining if you do that?It's not part of the current API since the error seems questionable. The form reference is generated from a useState and is never changed, so it's as stable of a reference as you'll get for React.