re: Difficulties Encountered with React Hooks VIEW POST


Most of my work has been converting older class-based components to functional components, which means also using hooks. I think the syntax around passing useEffect which components to watch is a little weird. The distinction between [], empty, [prop] is harder to grasp than the class methods. Also useRef is a little tricky because I need to use the current property which took a little digging through the docs to realize. Overall I think they are a good way to keep functional components small and isolated.

Code of Conduct Report abuse