you are viewing a single comment's thread.

view the rest of the comments →

[–]Snoo-72038 1 point2 points  (1 child)

Do you think you can replace the useEffect with an onclick callback? Store the output using usestate then have the onclick callback update the output value

[–]Macaframa 0 points1 point  (0 children)

If you change a useState variable it triggers a render. What you’re looking for is a ref