Wurfle
How to create a library that uses @solidjs/meta as a dependency
I'm writing a library that uses the
@solidjs/meta
Style component. I should be able to use this component in any Solid Start app because Start wraps everything in MetaProvider. However, I'm getting <MetaProvider /> should be in the tree
error. How should I write my package dependencies to make sure the same instance of @solidjs/meta
is used?8 replies
Is it possible to create a resource of type HTMLImageElement with SSR?
Is it possible to create a resource of type HTMLImageElement with SSR? The server would have to render the suspense fallback and then load the image right away on hydration.
I tried delaying the resource until onMount, but that wouldn’t render the suspense fallback in the meantime
7 replies
Client-only resource with SSR
Is there a way to make a client-only resource? that is, don't even bother on the server, render the fallback, then start fetching immediately on the client? I can use refetch in an effect but it briefly returns the server value before refetch starts without showing the fallback. Using a source signal does not render the fallback on the server
7 replies
What's the simplest way to combine the classList prop?
I have a component that takes a classList prop, and I want to combine it with a reactive classList object of its own before setting it on an internal element. What's the easiest way to do that while keeping the prop and the internal object reactive?
5 replies
Global style tags get added before page is actually visible
I'm trying to get a better understanding of how data loading works in Start. It seems that when I have a
<Style>
tag in a layout, but the actual route takes a long time to load, the Style tag will still render even when the rest of that route is not. Here's the repro: https://github.com/nonphoto/solid-test-global-page-styles1 replies
Passing data from route to layout in solid-start
I have a group of pages with one parent layout (ie /menu/lunch, /menu/dinner, with the layout under menu.tsx). The layout has a tab bar listing each of the pages under /menu. The color of this tab bar should change depending on the current route. Therefore I would like to be able to specify the color in the
routeData
of that route and read it from the layout but it appears this is not possible (and I can see why things would get confusing if this were the case). What is the best way to pass data from a route to its parent layout?11 replies