Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Start Using React Hooks #386

Open
johnpyp opened this issue Aug 7, 2019 · 2 comments
Open

Start Using React Hooks #386

johnpyp opened this issue Aug 7, 2019 · 2 comments
Assignees
Labels
discussion needed ⚠️ This issue needs to be discussed further before we can begin work on it enhancement New feature or request

Comments

@johnpyp
Copy link
Contributor

johnpyp commented Aug 7, 2019

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.

@johnpyp johnpyp added discussion needed ⚠️ This issue needs to be discussed further before we can begin work on it enhancement New feature or request labels Aug 7, 2019
@RajChaudhry
Copy link
Collaborator

RajChaudhry commented Aug 7, 2019

Huh, this is really interesting. This can make life a lot easier for new developers confused with lifecycle class methods. Lemme read into this a bit more, but so far i'm a fan, especially if implementing hooks are as easy as these articles say it is.

@Leftere
Copy link
Collaborator

Leftere commented Aug 9, 2019

I'm relatively familiar with hooks and I think they are awesome. They can also replace redux but its important to first understand how redux works.

@olena-ageyeva olena-ageyeva self-assigned this Oct 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discussion needed ⚠️ This issue needs to be discussed further before we can begin work on it enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants