Don't fully understand solid's reactivity, help understand with a case
I have this repo https://github.com/Kisuyo/todo
I created a component: https://github.com/Kisuyo/todo/blob/master/src/components/HamburgerMenu.tsx
I also created a route with a signal: https://github.com/Kisuyo/todo/blob/master/src/routes/index.tsx#L22
I am coming from react so perhaps this is confusing to me but I thought that as I pass both the signal and the setter of signal to component here: https://github.com/Kisuyo/todo/blob/master/src/routes/index.tsx#L42
I thought when I try to change the signal state the dom should update but it doesn't.
Doing solid tutorial again perhaps I misunderstand how reactivity works. Thank you for any help.
GitHub
todo/HamburgerMenu.tsx at master · Kisuyo/todo
Contribute to Kisuyo/todo development by creating an account on GitHub.
GitHub
todo/index.tsx at master · Kisuyo/todo
Contribute to Kisuyo/todo development by creating an account on GitHub.
4 Replies
also if anyone knows, I don't know why I get this error
https://github.com/solidjs/solid-styled-components/issues/44
GitHub
Getting
Unrecoverable Hydration Mismatch
error when there shouldn...Repo with code: https://github.com/Kisuyo/todo What I did was create this component: https://github.com/Kisuyo/todo/blob/master/src/components/HamburgerMenu.tsx And then try use it: https://github....
I think I use the styled-solid-components library correctly
You can't destructure in Solid basically https://github.com/Kisuyo/todo/blob/92c02b9fc431c2b3374ac4ea7baec836fc73dff5/src/components/HamburgerMenu.tsx#L10
GitHub
todo/HamburgerMenu.tsx at 92c02b9fc431c2b3374ac4ea7baec836fc73dff5 ...
Contribute to Kisuyo/todo development by creating an account on GitHub.
that should be props.active for example
I think those errors happen when the HTML that the server produced doesn't match the HTML that the client produced, no idea where the actual problem in the code is though