DEV Community

pawan deore
pawan deore

Posted on

personal notes hooks

useState(() => 0)

// this will not cause rerender

difference between useRef and useState is that useRef do not trigger re render

and value can be modified using ref.current object

and it is object don't de-structure it

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more