S
SolidJSā€¢3w 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ā€¢3w 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ā€¢3w 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ā€¢3w ago
Thanks šŸ¤Æ I hope I will understand these one day šŸ„¹ šŸ˜†
mdynnl
mdynnlā€¢3w 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?