79190963

Date: 2024-11-15 02:42:17
Score: 1
Natty:
Report link

Instead of "useState" try "useRef" as it avoid re-renders: const numPagesState = useRef(0);

and then you can use .current method to assign values numPagesState.current = numPages

Reasons:
  • Whitelisted phrase (-1.5): you can use
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: NOMAN MALIK