Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look into utilizing React Hooks + Functional Components #30

Open
danielhan-uc opened this issue Oct 15, 2020 · 0 comments
Open

Look into utilizing React Hooks + Functional Components #30

danielhan-uc opened this issue Oct 15, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@danielhan-uc
Copy link
Contributor

Goal of enhancement

As react version is > 16.8, you should be able to take advantage of...
A. Functional Components
Functional Components make your code easier to read and understand. With fewer lines, the size of your project will also decrease.
Refer to Link by React
Refer to Blog on Functional Components

B. Utilize React Hooks
React Hooks is a new way of managing state without writing class and setState. It helps organize file by separating state management and render.
Refer to Link by React
Refer to Medium Blog about Hooks

Areas like https://github.com/TeamFirstCapstone/Pet-Meeting-Client/blob/master/src/pages/Signup.jsx#L11-L17 can be optimized with hooks.

Optimizing code with Functional Components and React Hooks will also make writing tests much easier.

@danielhan-uc danielhan-uc added the enhancement New feature or request label Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants