“What is usually the best solution when two components need synchronized state?”
Keep separate states and synchronize them with Effects
Use useEffect in both components to mirror values
Lift the shared state to the nearest common parent
Store the shared value in refs instead of state