Rcls
Mar 20, 2022

--

Another way to solve this is to use `useEffect`. You need to treat useState as you would handle events. The value is available "at some point" and useEffect, with its dependencies set to that state value, trigger when the value changes. Then you can do your magic.

--

--

Rcls
Rcls

Written by Rcls

Consultant, software architect and developer, freelance UI/UX designer, computer engineer, tech enthusiast, father.

No responses yet