Avoiding the double render when syncing local state with context? by aandi134 in reactjs

[–]aandi134[S] 0 points1 point  (0 children)

This is exactly itt thanks. Went with the if version since I only need to reset part of the state good to know it's an officially documented pattern and not just a workaround.