Adam Goldstein
How to avoid temporary undefined values in template literals in solid-meta?
* If you want the title to render in order with the stream and you're rendering SSR, that is, which will ensure best SEO/OG support and such (though may not be strictly necessary these days). Otherwise wrapping them in a Suspense boundary should make cause load in later out of order, but skip the undefined values
3 replies
Default SEO vs Route SEO
I experienced what I think was a similar issue but kicked the can down the road, iirc it seemed like
<Title>
would override correctly but the other meta tags wouldn't (my memory could be failing me though). I thought about a solution like wrapping the Router in a context provider, and having a custom Meta wrapper component with a "default" boolean or "priority" integer prop which configures which meta component overrides which, then some whacky state setting in that context when the wrapper mounts (with onCleanup to reset it) so only the non-default/highest priority wrapped Meta children get rendered.
If you end up implenting some solution, I'd definitely appreciate it if you shared it, I'll do the same if I get around to that first13 replies
Cycles in dependency graph
Oh of course, duh 🤦. For some reason I was thinking of the signals calling themselves, of course it would be the computeds. The memo-like approach makes a lot of sense though, glad to see that seems to be working!
14 replies
Cycles in dependency graph
@Andreas Roth You may be long past this now, but this seems doable (at least at first glance) by taking advantage of batched updates, either with the
batch
utility or relying on automatic batching. As long as all the updates are running inside a single batch, I think something like the following might work:
Just a thought, not sure 🤷14 replies
Auth in layout?
This is Solid Start right? I ended up going with a
<ProtectRoute>
component which has an SSR-blocking resource for auth, and conditionally renders a <Navigate>
component once auth is resolved as unauthenticated. Seems to work great with layouts10 replies
State sharing between Islands
My understanding is it should work fine as the roots handle disposal. If you create the signal statically, there shouldn't be a problem, you can have memory leaks if you create them dynamically though without wrapping them in a
createRoot
. Please someone correct me if I'm wrong though!3 replies
createResource with a nested source signal doesn't retrigger
You might want to try adding some logging, a few log statements for the resource source array accessor, the fetcher, and an effect on the startTime signal might make it clearer what is updating when. Apologies if you've already tried that, I just had a similar error and that helped me solve my own silly mistake 😃
7 replies