solid-start
solid-start copied to clipboard
Multi action result stuck in pending if there was a newer submission
When there are multiple submissions to multi action that are pending, only the latest one will ever resolve. All the previous one will be stuck in pending for ever, even if the corresponding request finished.
Reproduction: https://stackblitz.com/edit/vitejs-vite-kuuenu?file=src/routes/index.tsx
You can quickly click the submit button few times and observe that only the latest one will finish
I found this line in the code and it seems to be responsible for this problem: https://github.com/solidjs/solid-start/blob/main/packages/start/data/createRouteAction.tsx#L179
I've got an idea what it's responsible for in standard createRouteAction. Though I'm not sure whether it should be there in multi action
Solved in #313
Hmm.. testing this I remember why I had it this way. To prevent excess thrashing. It basically waits for all settled to refetch the data. Transitions will hold them anyway... we should be clearing pending at this point is probably the issue. I will see if I can fix this better.