wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
13.64k stars 1.18k forks source link

[example/Waspello] Use optimistic UI updates to avoid lagging in the UI (e.g. when moving list/card around) #339

Open matijaSos opened 3 years ago

matijaSos commented 3 years ago

Since everything in Trello is pretty much happening on the same page/view, it is a great example of a need for optimistic UI updates! Since currently we don't have a support for it in Wasp, this is the kind of "lag" that appears in the UI:

waspello-no-opt-UI-updates

When the card is dragged to the new position, first the API request is made and only once the response is received the UI can re-render itself with the correct info from the query. So in the time while the client is waiting for the response from the server, UI stays in its previous state (b/c the query returns the "old" data) and that is why the lag appears.

The optimistic UI update feature is currently being discussed in #63 .

infomiho commented 1 year ago

@matijaSos Is this now unblocked after optimistic updates were released? https://wasp-lang.dev/blog/2022/11/30/optimistic-update-feature-announcement

Martinsos commented 1 year ago

@infomiho yes!