apollo79
Explore posts from serverscreateEffect is reactive, JSX isn't
No, the
Dynamic
shouldn't affect this, just as the createEffect
, the template is still reactive
You usually don't pass accessors as props though, but call it as you pass it and solid transforms it into a getter, so that could be the reason here. Try passing loading={loading()}
and then consume it as boolean
in your component7 replies
SolidJS Universal - How does the method of tree creation get chosen?
34444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
12 replies
API Routes Not Found. Can You Help?
solid-start provides you a web request object, so you can just refer to mdn: https://developer.mozilla.org/en-US/docs/Web/API/Request
6 replies
API Routes Not Found. Can You Help?
1. You have to return something from your route, else the route "does not exist", as it has no content.
2. The API call arrives at the server and the function gets called. It is found on the server, but does not exist for the client as it has no content or different status code
3.
request.body
is a ReadableStream
, but since you are using JSON, you can simply call await request.json()
and you will get the data
I hope that this is helpful, if you have any questions, feel free to ask 🙂6 replies
How can I set a style based on reactive state with fallback to props?
The way you have it now, it will call the
clicked
getter function only once, to have it rerunning, you can change color
to be a getter
https://playground.solidjs.com/anonymous/de94fa0e-cefd-4f24-8f1e-9351ff5907f66 replies