Skip to content

Conversation

@MicroJes
Copy link

当点击事件触发再次渲染,并不会进入条件判断中的 useState。所以,cursor=2 的时候对应的变量是 num2。而其实 num2 对应的 cursor 应该是 1。就会导致setNum2并不起作用。

当点击事件触发再次渲染,并不会进入条件判断中的 useState。所以,cursor=2 的时候对应的变量是 num2。而其实 num2 对应的 cursor 应该是 1。就会导致`setNum2`并不起作用。
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

Successfully merging this pull request may close these issues.

1 participant