Problem with createAsync.
When my client side try to get data from my server side with createAsync it just will always return a undefined values even when I change the getter to return a string without passing by other function or storage. It is build on the template with-auth of solidStart in typescripts.
Here the function on the server side :
On the client side :
9 Replies
It will only run once in this case. You need to wrap in createEffect for it to run when it changes
I'm not sure to understand, why the fact that it run only once will make it so that it return undefined.
createAsync doesn't block so the data is undefined until the network request finishes
So i just need to do something like that :
Just wrap your console log in a createEffect
Or render dataList in jsx
But is there a way to make it usable during the render without have to put it in a createEffect?
Because I use ag-grid, so it need the data to load the grid or the only way during render is just to put everything inside a createEffect().
The jsx is reactive so this should work
I'm using ag-grid in a project too. I use the
onGridReady
event and then manually set the dataIt finally work with onGridReady event
Thank you