This repository has been archived by the owner on Feb 28, 2022. It is now read-only.
Start Using React Hooks #386
Labels
discussion needed
⚠️ This issue needs to be discussed further before we can begin work on it
enhancement
New feature or request
I think it could be valuable to start using the relatively new, and officially recommended, api of React Hooks. React hooks are a way of replacing classes in React, which come with many issues (such as understanding classes, understanding
this
, higher order components, and render props, to name a few).This "Introducing Hooks" piece outlines the main reasons to use hooks now, and how you can start to integrate it: https://reactjs.org/docs/hooks-intro.html.
Functional components built with Hooks are completely compatible with Class components, and I believe they are much more readable and understandable, especially for newcomers who may not be familiar with the complex (and, in my opinion, convoluted and unnecessarily confusing) nature of javascript Classes. Facebook is writing all their newly written components in Hooks for these reasons, and others outlined in the "Introducing Hooks" piece.
The text was updated successfully, but these errors were encountered: