Liquido
How to store JSX element in a signal and render it from other elements
I have created a dialog system using context where the dialog that I want to render is stored via a function provided by context and the provider is the one that renders the dialog:
Playground Link: https://playground.solidjs.com/anonymous/5d842f3f-3a3c-49b8-8287-9d46e0d29ca1
This works well but I have two problems. Firstly, I get a warning in the console when I trigger the modal:
dev.js:836 computations created outside aAnd secondly, some components are not rendered when I open the modal. For example, I installedcreateRoot
orrender
will never be disposed
solid-icons
package to render an icon. The icon is not rendered on first open but when I modify the code to trigger hot reload, the icon component is rendered inside it. The icons are rendered fine everywhere else.6 replies
How to pass props to context reactively?
I have a context that accepts props and then provides the prop values to its consumer components:
Playground link: https://playground.solidjs.com/anonymous/d7a38bbe-fa34-49c9-9d8f-7211839257ad
How do I make the props passing to the context value reactive?
10 replies
With Solid Auth template, I get "UnknownAction: cannot parse action at /api/auth/session"
I am using the Solid Start with Auth template and created a server action form form submission
This is the error keep getting on the server side:
[auth][error] UnknownAction: Cannot parse action at /api/auth/session. Read more at https://errors.authjs.dev#unknownactionMy goal is to get the userId from the session object. What am I doing wrong here?
10 replies
How can I set a style based on reactive state with fallback to props?
I want to change color of a button when active and return back to default value when not active:
https://playground.solidjs.com/anonymous/c98af79a-5755-4edd-a7a4-f91d60c3ae02
How can I make the
style
value inside the Internal
component reactive?6 replies