Open muskan-Bansal opened 1 year ago
it works if wrap it in _app.js file in a way that stateContext binds only component and not from the layout
But now the problem is functions we passed in the context api like incQty doesnt change the state of qty on click
Could you please tell me what exactly is going wrong
So you are saying that context works well but it doesn't change the state. May I know how are you checking that state is not updated ? Are you using console.log(qty)?
make sure that you implemented th context correctly and dont forget to enclose all the components in _app.js with your context