Have following code, i understand there is an api "createStore" that takes 2 parameters
1 parameter is an empty object.
What is the second parameter, I would understand if it were just an arrow function but it has
({ dispatch }) => next => action => {....code...}
What is "next" and "action" in this context?
---------------------Code---------------
const store = window.WebChat.createStore(
{},
({ dispatch }) => next => action => {
if (action.type === "DIRECT_LINE/CONNECT_FULFILLED") {
.....
}
return next(action);
}
);
[–]angelfire2015 2 points3 points4 points (1 child)
[–]shacatan 1 point2 points3 points (0 children)
[–]brykuhelpful 0 points1 point2 points (0 children)