Replies: 2 comments
|
Solid does not have a theme provider but provides a way to create a theme provider. What you are trying to do is to use a context value to pass data, a JavaScript object with CSS values, to downstream components. Since code has no issue but you don't know how it works, it is best for you to learn how solid works, how context API fits into its reactive system. You can check out this answer for it: https://stackoverflow.com/a/74492899/7134134 |
0 replies
|
I've created a bounty for this question on StackOverflow, you can see it here. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm kind of new to SolidJS, and now I'm trying to work out how SUID's
ThemeProviderdiffers from SolidJS's (e.g. this docs provider/context example). A simple example would be how to switch between light and dark modes from a child component. What's the proper way?I've tried something like this so far, but it hasn't worked, I thought signal reactivity would be enough, but I think I'm misunderstanding a core concept somewhere.
If the example below is successful, then the background should switch between black and white.
All reactions