redux-zero / redux-zero

A lightweight state container based on Redux

Home Page:https://matheusml1.gitbooks.io/redux-zero-docs/content/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Async example only updates state once

esperancaJS opened this issue · comments

Async actions seem to not update the state or register an action on the chrome dev tools after the async request.

This was attempted with the example on the README and on this thread.

@PedroEsperanca I think that the state is being updated but the DevTools are not reflecting it.

Can you setup an example showing that the async request isn't working without the DevTools?

@Kiho maybe we got something wrong on the DevTools?

It's hard to know what's really happen without repro is provided. I guess problem related to the comment in this thread #36 (comment)
If that's the case then need to make actions are unique and need to be saved in it's own files.
I can't do not much thing here because it's caused by no key is associated to action in redux-zero.

thanks for the quick response!

You are right, it's just a little quirk with the dev tools. The actual store updates fine.

Here a full example: https://github.com/PedroEsperanca/redux-zero-async-example

I missed to test asynchronous actions during development. I will try to find out solution in short time.

Hi @matheusml
I found solution for async actions here
Kiho@d63baca
I can make PR if you like it.
cc @PedroEsperanca

Great @Kiho! Please open a PR with this fix.