Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于极简react的useStateDemo的问题 #86

Open
yuqiuyu123 opened this issue Jun 22, 2021 · 0 comments
Open

关于极简react的useStateDemo的问题 #86

yuqiuyu123 opened this issue Jun 22, 2021 · 0 comments

Comments

@yuqiuyu123
Copy link

if (hook.queue.pending) {
  let firstUpdate = hook.queue.pending.next;
  do {
    const action = firstUpdate.action;
    baseState = action(baseState);
    firstUpdate = firstUpdate.next;
  } while (firstUpdate !== hook.queue.pending)
  hook.queue.pending = null;
}

hook.queue.pending = null;为空的话dispatchAction方法的else逻辑不会执行?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant