DEV Community

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

anubra266 profile image

If I got this right. I should use state only for data manipulation. But refs for DOM manipulation

sakethkowtha profile image
sakethk Author

If you are doing only dom manipulation then instead of state ref will be good choice.