Skip to content

ref for values, that doesn't cause re-render? #1651

Closed Answered by LeCarbonator
marc-at-brightnight asked this question in Q&A
Discussion options

You must be logged in to vote

@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.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@marc-at-brightnight
Comment options

@LeCarbonator
Comment options

@marc-at-brightnight
Comment options

@LeCarbonator
Comment options

Answer selected by marc-at-brightnight
@marc-at-brightnight
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants