hannus
Modifying Signals Returned by createAsync in SolidJS: Best Practices and Alternatives
thanks. My understanding is that the value returned by createAsync is a signal, and if I want to modify it, based on the principle of unidirectional data flow, the best practice is to notify its data source that the data has been updated. Specifically, this can be done by using an Action to modify the data source. Once the data source is updated, the signal value obtained by createAsync will automatically be updated accordingly.
Is my understanding correct?
4 replies
How can I make createEffect in SolidJS execute only when the dependency variable changes, and not wh
Thanks, it works. You’ve been a great help to me.
If I have more than one signal to depend on, such as value() and title(), how should I handle it?
18 replies
How can I make createEffect in SolidJS execute only when the dependency variable changes, and not wh
Thanks. However, it doesn’t work. The effect doesn’t execute, not only during the initial run but also when the value is updated afterward.
18 replies
How to use a resource in a structure field as a reactive signal?
I think you could try to createStore to create a object signal. In the object, every attribute is reactive. On the other hand, if you want to some attribute to fetch data, just create an object including the signal what you have created. For instance:
10 replies
SSR Cookies
what's more, if you wanna encrypt the cookie, you could try useSession which is a special cookie that encrypt in the server.
The example and documents plz check the following link:
https://h3.unjs.io/examples/handle-cookie
tip: import from vinxi/http rather than h3
43 replies
SSR Cookies
I think setCookie and getCookie are useful for your scenario. Import them from vinxi/http rather than h3 because vinxi has wrapped them for better experience. Based on them, you could handle cookie within http request, and they work well with SSR of Solidstart.
43 replies