Open johannbuscail opened 3 years ago
In the code, every function is defined inside the component without using anything. This leads to memory leak and bad optimization. To prevent this, use useCallback hook from react. It will create a memoized callback. For more: useCallback docs
useCallback
memoized
In the code, every function is defined inside the component without using anything. This leads to memory leak and bad optimization. To prevent this, use
useCallback
hook from react. It will create amemoized
callback. For more: useCallback docs