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

useLocalStorage + useReducer + useContext #81

Merged
merged 10 commits into from
Nov 22, 2023
Merged

Conversation

pearlescence-m
Copy link
Collaborator

@pearlescence-m pearlescence-m commented Oct 10, 2023

In this PR I refactored and merged all the code we had on these three topics. The working version can be applied to Cart, Checkout, Single Product page and Hall of Fame. The resulting local storage hooks are used in 2 contexts: user and cart, but they are reusable could be potentially applied to the new contexts.

Copy link
Owner

@larkinds larkinds left a comment

Choose a reason for hiding this comment

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

Great work with this refactor and the detailed documentation!

Just a few items to be addressed, and a few items for clean up.

client/src/Components/ProductCard.tsx Outdated Show resolved Hide resolved
client/src/Components/ProductCard.tsx Outdated Show resolved Hide resolved
client/src/reducers/cartReducer.tsx Outdated Show resolved Hide resolved
client/src/reducers/cartReducer.tsx Show resolved Hide resolved
client/src/reducers/cartReducer.tsx Outdated Show resolved Hide resolved
@pearlescence-m
Copy link
Collaborator Author

@larkinds hi! I fixed all the requested changes and wanted to ask if you have any other comments. Otherwise, we might need this to be approved and merged for the next issues.

Copy link
Owner

@larkinds larkinds left a comment

Choose a reason for hiding this comment

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

Looks good! Great work :)

@pearlescence-m pearlescence-m merged commit d0ee95f into staging Nov 22, 2023
@pearlescence-m pearlescence-m deleted the persist-state branch November 22, 2023 16:54
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.

3 participants