wavychat / video-editor

:movie_camera:. A fast cross-platform video editor with a multitude of functions (draw, image import, text, audio editing)
https://wavychat.gitbook.io/video-editor/
8 stars 0 forks source link

Use hook useCallback() #15

Open johannbuscail opened 3 years ago

johannbuscail commented 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