AlberTenez
How to handle necessary async/await work inside of a createEffect?
The question coming into my mind is, if everything is client-driven, how do you securely connect to the db from the front end?
Check this out: https://start.solidjs.com/core-concepts/actions and https://start.solidjs.com/core-concepts/data-loading I think will be helpful. In case you are using solid start.
In case you are not using solid start, you could use createResource with and async fn https://www.solidjs.com/docs/latest/api#createresource
or, you could do sth like this in a simpler way:
These are the options I could think of.
8 replies
How to handle necessary async/await work inside of a createEffect?
This will depend on your implementation. You could use actions or createAsync with cache. A potential way to do it could be:
This is some ideas to your implementation, you will need to adapt to your code. Happy coding!
8 replies
Unexpected behaviour on a shuffled hardcoded list with Solid Start
I also tried to add the shuffle inside a createEffect and update places with a setPlaces Setter. But not success.
You can see the image missmatch happening on https://viatsy.com/ (site under construction)
15 replies
What is the difference between Transition
Gottcha! Thank you @Brendonovich
I found https://www.solidjs.com/docs/latest/api#usetransition I believe is used internally for this hook.
Perfect, I got what I need. Thanks again!! 🙂
4 replies