Context In Typescript

I'm trying to create a context in Typescript following this example, but copying and pasting the code results in an error when I try and use the ThemeContext.Provider in the ThemeProvider Component. https://www.solidjs.com/examples/context Cannot find namespace 'ThemeContext'. Any suggestions?
SolidJS
Solid is a purely reactive library. It was designed from the ground up with a reactive core. It's influenced by reactive principles developed by previous libraries.
13 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
FutureLights
FutureLightsOP2y ago
I can't replicate the error in the playground so it must be something with my configuration. Is there anyway to see what configuration the playground is using? I'm just using the default template from Solid JS without any major changes.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
FutureLights
FutureLightsOP2y ago
Sure. Anything else that would be helpful?
jesseb34r
jesseb34r2y ago
@futurelights can you reproduce it in the solid playground? makes it way easier for us to help troubleshoot
jesseb34r
jesseb34r2y ago
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
FutureLights
FutureLightsOP2y ago
It works in the playground just fine, which is great, but doesn't help my problem. I've downloaded the project and it's fine in VSCode. I'm trying to make sure that everything lines up between my two projects.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
FutureLights
FutureLightsOP2y ago
It's ts lol. tsx fixed it. Thanks
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
FutureLights
FutureLightsOP2y ago
Well at least it was an easy fix. Yeah. That was confusing. Thank you!
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server