Was watching Theo's video and wondered if solid had a good way to do this

https://youtu.be/jYV1VDhw7E8?t=447 It involves saving a state when a components moves position in the DOM. Theo will explain it way better than I ever could
Theo - t3․gg
YouTube
An Operating System Built With...jQuery???
Puter was NOT what I expected. Dare I say it, this jQuery-based operating system is...kinda good? Oh no... Browser based operating systems are a strange concept, but not gonna lie I'm impressed SOURCES: https://puter.com/ https://github.com/HeyPuter/puter https://news.ycombinator.com/item?id=39597030 https://twitter.com/naribuildsstuff Check ...
8 Replies
bigmistqke
bigmistqke8mo ago
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
eatingtheham
eatingtheham8mo ago
Yes, but as soon as you put the components in a seperate div, it breaks. https://playground.solidjs.com/anonymous/8091bbc0-fc25-49a9-aed1-865d9899ba29
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
bigmistqke
bigmistqke8mo ago
hu interesting!
bigmistqke
bigmistqke8mo ago
a yes ofcourse, with the cleanup it deletes the html-nodes... so you will need to do some runWithOwner/getOwner type of stuff to prevent that from happening: https://playground.solidjs.com/anonymous/d34bd8ea-e0bd-4feb-8a1c-51713f14a9db
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
eatingtheham
eatingtheham8mo ago
Hmm interesting.
eatingtheham
eatingtheham8mo ago
The funny thing is when you remove reference to isAbove() in the code. Because this now breaks. https://playground.solidjs.com/anonymous/efea4798-5c24-4510-b4cf-58857c863bc0
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
bigmistqke
bigmistqke8mo ago
ok lol then i m lost haha
eatingtheham
eatingtheham8mo ago
Lol
Want results from more Discord servers?
Add your server