Hi Emin,

The simple solution may be at UX design. The over updating comes from the global indication which section is active, with many sections visible simultaneously.

For your example, if you don't have to de-active the previous active Li, the update is localized. You may consider to use a wizard for the workflow.

If there is no way to re-design the workflow/CSS, useRef will be a choice. Thanks for sharing the problem and solution.

Please let me know if you find a better way.

Have a nice day!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store