heron2014 / weather-redux-app

Weather app build in React and Redux
0 stars 0 forks source link

ajax request with redux #5

Open heron2014 opened 8 years ago

heron2014 commented 8 years ago

redux-middleware

What is Middleware?

npm module redux-promise - helps to do AJAX request with Redux, its unwraps the data for us without dealing with any callbacks, it looks almost like a synchronous request.

When the action have Promise , redux-promise unwraps the data which goes to reducers.

heron2014 commented 8 years ago

axios library allow us to do ajax request from the browser docs

returns a promise - check docs