reduxtutorial

· Frontend
Synchronous Actions Till now, as soon as an action was dispatched, the state was immediately updated. If you dispatch the BUY_CAKE action, the nomOfCakes was right away decremented by 1. Async Actions Asynchronous API calls to fetch data from an end point and use that data in your application. Goals for our application Fetches a list of users from an API end point and stores it in the redux stor..
· Frontend
Middleware Suggested way to extend Redux with custom functionality. Provides a third-party extension point between dispatching an action, and the moment it reaches the reducer. Use middleware for logging, crash reporting, performing asynchronous tasks etc. We will use 'redux-logger' in this example. Previous code // index.js const redux = require('redux') const createStore = redux.createStore co..
· Frontend
Middleware 미들웨어 Custom functinoality로 Redux를 확장시키기 위한 방밥으로 권장되는 방식. Action을 dispatch할 때와 action이 reducer에 도달하는 순간의 사이에 third-party extension을 사용할 수 있도록 해준다. 로깅, 크래시 리포트, 비동기 처리등의 작업을 할 때 사용된다. 이 예제에서는 'redux-logger' 미들웨어를 사용해보았다. 이전 코드 // index.js const redux = require('redux') const createStore = redux.createStore const combineReducers = redux.combineReducers const BUY_CAKE = 'BUY_CAKE'; const ..
rocher71
'reduxtutorial' 태그의 글 목록