@ApplePieGiraffe
Posted
Greetings, kasey! 👋
Nice job on this challenge! The UI looks great 👍
I don't have time to look at all of your code but I had a quick look at the Card component. You don't really want to be using the router to refresh the page to display changes in the UI (that's a bit of anti-pattern as this is what React state is for). Instead, if you store the card data in some state then any time you update that state, React will re-render any components which use that state and update the DOM for you. You can then update local storage with that new state value if you want persist data that way for this project. Also since some of the cart data appears in other places around the site (such as in the product pages), you may want to store that state higher up in your app and pull it into components with React context. If you want to learn more about React state or context, I'd recommend checking out the new React docs as they are very-well written and include a few helpful guides. Hopefully that makes sense 👍
Keep coding (and happy coding, too)! 😁
Marked as helpful
@kaseyvee
Posted
@ApplePieGiraffe I really appreciate this! This makes sense and sounds like a good start. I'll look into this soon. Much thanks for the insight!