Next.js Discord

Discord Forum

How to rerender component with createContext?

Unanswered
Chow Chow posted this in #help-forum
Open in Discord
Chow ChowOP
How can I make it so that when a button is clicked in one component (CheckoutCart), causing a change in the contexts total amount, the other component (CheckoutSidebar) that shares a common context will automatically re-render and update his displayed total amount? Now rerender in CheckoutSidebar happens only after page reload

0 Replies