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

Start Using React Hooks #386

@johnpyp

Description

@johnpyp

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.

Metadata

Metadata

Assignees

Labels

discussion needed⚠️ This issue needs to be discussed further before we can begin work on itenhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions