happypoulp / redux-tutorial

Learn how to use redux step by step
3.76k stars 546 forks source link

Great tutorial, but could there be an alternate react project that doesn't use async actions #106

Open ceres629 opened 8 years ago

ceres629 commented 8 years ago

Could be just me trying to cut corners but I found that the introduction of async actions seemed to make the tutorial take quite a bit more time to understand and as a complete beginner to react/redux I wanted to skip async actions and first understand how regular actions and react work.

However because the final project tying everything together with React uses async actions. I was compelled to go back to the async actions section. Its not a big deal, you explained it well and i understood it, it just felt it would be better as an optional section and wonder if there is a specific reason you introduced it that maybe as a beginner isn't obvious to me. Thanks for the great tut!

carlostighe commented 8 years ago

I havent used react but JavaScript frameworks revolve around async actions, thats how they retrieve the data they use.

happypoulp commented 8 years ago

Hi,

It's true that there is no specific reason to use async actions for the last example. However since it's a very basic pattern that you will need when trying to build a real application, I thought that it might worth using it in the final example. It's also quite useful to illustrate the possibility of doing some optimistic update of your UI while waiting for an async response from a server (using the *_REQUEST action). However, you're right that the last example might deserve a simple sync action alongside the async one, thanks for the suggestion, I will try to modify it! I'll leave this issue open until then to remind me to do so.