redux-utilities / redux-promise

FSA-compliant promise middleware for Redux.
MIT License
2.67k stars 134 forks source link

Optimistic updates #12

Open tappleby opened 8 years ago

tappleby commented 8 years ago

This is related to the sequence discussion in acdlite/flux-standard-action#7.

If payload is a Promise, where should data needed to perform the optimistic update be put? meta?

Wherever this data ends up being stored I think it should become the payload for first action in sequence.

acdlite commented 8 years ago

We're using the sequence branch of redux-promise and redux-actions at OpenGov, and we put data needed for optimistic updates inside of meta. Not sure about making it the payload of the first action — it seems redundant, if it's already part of meta.

tappleby commented 8 years ago

Makes sense, my initial though was it felt weird having to look at meta while in the reducer instead of payload. After thinking about it some more, it would probably be confusing for a value you put in meta to move to payload.

kwelch commented 8 years ago

Is there an npm version that be installed to leverage sequence updates prior to it being part of spec?