DEV Community

Discussion on: Don't be too dependent on useState, useRef is there for you

 
sakethkowtha profile image
sakethk

You can try two things

  1. React context or
  2. React Redux

i would say react context will be the better option
refer this for context kentcdodds.com/blog/how-to-use-rea...

Thread Thread
 
sakethkowtha profile image
sakethk

this is basic example : daveceddia.com/usecontext-hook/

Thread Thread
 
shubhamtiwari909 profile image
Shubham Tiwari

Thank you I get the concept
I will try to implement it for my project hope it may work