martixy
martixy
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
Hm, well, it does make sense, this component is effectively the root of the "application".
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
let [progress, setProgress] = createSignal({ progressFraction: 0 });
options.progress = progress;
let [progress, setProgress] = createSignal({ progressFraction: 0 });
options.progress = progress;
I put it as a property on the object so it can go in the template at the top. 🙂
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
the downloads signal, which is at the top contains the other signals which are created at the bottom of the stack.
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
TBH I was expecting remarks around passing around the same object and mutating it along the way... If I didn't need to tunnel the signals from the bottom to the top it would have been much easier I think...
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
Oh, yea. That was some old code copied over.
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
Oh, thank you! That's a nice rule 🙂
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
Uh.... based on first reading of the docs, that seemed the most appropriate one.
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
I mean CSR
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
No.
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
It took me a while but I think I'm starting to get it. I get no warnings now, and my code works as expected. However I would appreciate advice on how the code is structured. https://playground.solidjs.com/anonymous/ad7bb9a9-ccd8-496a-a680-15c32d5d9330 Mostly, is there anything wrong with how I create the signals and how I pass them around? And if there is, what is a better way to do this? (To make it easier to parse - the call chain is kbHandler -> collectDownloads -> startDownloads -> queueDownload)
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
Good point.
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
I mean it causes a warning, but the playground does not reproduce it.
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
Maybe it's in production mode?
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
Tnx. Sure to come in handy. I have to figure out a few other things first, but I'll try it.
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
Hm, that's good to know. But I need the event to be global.
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
That sounds good. Ok, let me try to parse the playground you gave first before trying the createRoot/runWithOwner route.
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
Ah, it isn't...
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
Ah, I see. runWithOwner looks awfully similar to .bind() 🙂
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
@peerreynders I am very new at solid and trying to parse what's going on.
47 replies
SSolidJS
Created by martixy on 5/1/2024 in #support
computations created outside a `createRoot` or `render` will never be disposed
@Brendonovich I'm not sure what to do with createRoot. What about getOwner/runWithOwner?
47 replies