Skip to content

Commit

Permalink
Add comment why return callback by calling emit
Browse files Browse the repository at this point in the history
  • Loading branch information
HillLiu committed Sep 4, 2024
1 parent 1f83345 commit 54cd1f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/reshow-flux-base/src/createReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ export const getMitt = () => {
*/
emit: (state, action, prevState) => {
const nextExec = pool.slice(0); //https://github.com/react-atomic/reshow/issues/96

// Return the callback to get nextExec first.
return () =>
nextExec.reduce(
(curState, curFunc) =>
Expand Down

0 comments on commit 54cd1f2

Please sign in to comment.