Last 12 weeks · 0 commits
1 of 6 standards met
Great video and clean approach. However, it seems that in the React 16.8 this way of using async is not allowed. The console throws this error: Warning: An Effect function must not return anything besides a function, which is used for clean-up. It looks like you wrote useEffect(async () => ...) or returned a Promise. Any chance you can refactor to comply?
Repository: benawad/react-hooks-examples. Description: Trying out React Hooks Stars: 85, Forks: 51. Primary language: JavaScript. Languages: JavaScript (76.6%), HTML (18%), CSS (5.4%). Homepage: https://www.youtube.com/playlist?list=PLN3n1USn4xllL1OrVr-A4oq7SG-cS9MOQ Open PRs: 0, open issues: 1. Last activity: 7y ago. Community health: 28%. Top contributors: benawad.
for optimization, you can use useCallback and React.memo also when you want todos in useCallback you can get this way