Post

Something I can't get to like in async/suspense, no matter the framework is that it still shows the old values while waiting the async update, e.g. here clicking on the button increments, triggers a fetch but the displayed value is blocked until fetch completes

if I click next page, I want to see the page number increment immediately, only parts depending on async stuff should delay changes until data is ready. So what am I missing (and this is not about Solid, Vue has similar issues with Suspense)? Or is this just for simple straightforward async/await?

Thanks! I never actually read the docs of this before Something just doesn't feel right: if `useOptimistic()` always takes a state value as a parameter why not collapse both functions into one? Or why the manual extra layer? Or does this also integrate with react transitions and covers more?

it is specifically for Transitions. With what other function should it be collapsed? Keep in mind that you can have multiple optimistic states for a Transition.

0 reposts1 like

I was thinking with state because it’s like having optimistic state. But looking at solid, the reversed approach seems easier: a function (called latest) to get the optimistic value