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

adjustment: refactor AppJs to Hooks #58

Merged
merged 3 commits into from
Mar 5, 2022
Merged

Conversation

fajar13k
Copy link
Collaborator

@fajar13k fajar13k commented Mar 5, 2022

Regarding #37 to refactor current state of the site, to migrate from Class Component based to use React Hooks

Files Changed:

  • src/components/App.js

};

setLoginAttention = (value) => {
this.setState({ loginAttention: value });
const toggleLoginAttention = (value) => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont think we need updateUser or toggleLoginAttention anymore, since they're equivalent to setUser and setLoginAttention respectively

can we delete these functions, and directly pass setUser and setLoginAttention to the components below?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oki, understood.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently has errors, trying to aswell convert affected components now to Hooks.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o did i merge too soon LOL

@@ -1,8 +1,12797 @@
{
"name": "gtsosu",
"version": "1.0.0",
"lockfileVersion": 1,
"lockfileVersion": 2,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you un-commit package-lock.json for now? we talked about this in the dev channel, and i wanna get our node versioning etc. sorted out and then i'll update package-lock in a separate commit

Copy link
Owner

@cory2067 cory2067 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, thanks

@cory2067 cory2067 merged commit d7311b3 into cory2067:master Mar 5, 2022
cory2067 added a commit that referenced this pull request Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants