S
SolidJS•3mo ago
snorbi

Reactive context in built-in components

I've looked into the source code of the core components, like: https://github.com/solidjs/solid/blob/fff8aed62b4bff78a0016c3c08ba644652ccac18/packages/solid/src/server/rendering.ts#L291 My question is: why are these components reactive at all? :] I mean they seem to be simple JS functions, their code is not wrapped by the usual "reactive context" providers like JSX, createMemo(), etc. Thanks.
5 Replies
mdynnl
mdynnl•3mo ago
this is solid's server code where reactivity is not that useful they simply need to function according to their logic to get the final result
snorbi
snorbiOP•3mo ago
Ohh, thanks. Then I looked at the wrong files, I was interested in the reactive variants... šŸ˜• Maybe I found them? https://github.com/solidjs/solid/blob/fff8aed62b4bff78a0016c3c08ba644652ccac18/packages/solid/src/render/flow.ts#L102 šŸ˜„ This is rocket science šŸ˜„
snorbi
snorbiOP•3mo ago
Thanks 🤯 I hope I will understand these one day 🄹 šŸ˜†
mdynnl
mdynnl•3mo ago
posting the last bits because it took me (a lot of us actually 🤣) some amount of time to figure out

Did you find this page helpful?