SolidJSS
SolidJS3y ago
5 replies
nikiv.dev

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
Contribute to Kisuyo/todo development by creating an account on GitHub.
GitHub - Kisuyo/todo
GitHub
Contribute to Kisuyo/todo development by creating an account on GitHub.
todo/HamburgerMenu.tsx at master · Kisuyo/todo
GitHub
Contribute to Kisuyo/todo development by creating an account on GitHub.
todo/index.tsx at master · Kisuyo/todo
Was this page helpful?