#React context doesn't work anymore since I migrated my project with TypeScript
17 messages ยท Page 1 of 1 (latest)
No I have nothing in my console, it's really disturbing
OK I'll look into it.
Your dependency versions are messed up btw.
@strange surge Somehow your cartContext is undefined as you're using it on the product page.
I'm not yet sure how that's possible, any ideas?
@strange surge Oh wait I can see you're creating a new CartContext in ProductPage.tsx instead of importing it from App.tsx
If you can I'd recommend using Vite instead of CRA btw.
๐คฆโโ๏ธ omg I feel so stupid. I'm gonna check that right now
happens ยฏ_(ใ)_/ยฏ
Anyway I'd also recommend you get familiar with the debugger tools in the browser.
It work perfectly well now, thank you so much ๐
Yw
I will for my next project ๐
Sorry for intruding but how do you check this ? ๐ฎ
I tried to run an npm install but it gave all sorts of errors.
Oh lol, I feel stupid ๐