If you just started to newly talk to and Event Sourcing/CQRS backend one aspect
might not be obvious for you: optimistic updates are your friend!

From synchronous REST APIs we are used to this: write, read, update. >

Thu, 23 May 2019 17:55:30 UTC11

2 replies

Replying to @coderbyheart

You write (POST) to change the state of the system and then read the new state
of the system (or get it back right away from the POST), then update the UI
state with what you received from the server. However with ES/CQRS systems you
normally will be done with the write part.

Replying to @coderbyheart

The result of that is an event and if the write is accepted you should
optimistically update your state of the system right away and go on about your
business. This will drastically improve the responsiveness of your UI and save
you a lot of round-trips.