Versent / redux-crud

A set of standard actions and reducers for Redux CRUD Applications
MIT License
623 stars 54 forks source link

fetchError reducer #30

Open MikeTaylor opened 8 years ago

MikeTaylor commented 8 years ago

Why is there no fetchError reducer?

sporto commented 8 years ago

Because there is nothing to do when an error happens in term of resources. You might show the error to the user, but as the resources were not added to the collection there is no need to trigger a reducer.

MikeTaylor commented 8 years ago

I am new to this, and no doubt missing something. But it seems to me that when you try to fetch data, if that fetch fails, you want to populate your Redux state with an error indicator which will subsequently be shown to the user. Is there a better way?

sporto commented 8 years ago

You can still do that using an action and reducer of your own. This lib doesn't have any opinions on how you store errors.

MikeTaylor commented 8 years ago

OK, thanks, that makes sense.

It might be worth adding a brief paragraph to the documentation explaining this?

Otherwise, this issue can be closed as far as I am concerned. Thanks for your help.