DEV Community

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

Collapse
anubra266 profile image
Abraham

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

Collapse
sakethkowtha profile image
sakethk Author

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