You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assuming that the state is updated after rendering the messagePars, the messagePars will be rendered again, but also the old value of stateRef.current will be used, and the value of stateRef.current will be updated again after the execution of useEffect.So the messagePars always use the previous state value, is it by design?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi Team,
I think there is a bug in useChatbot.
Assuming that the state is updated after rendering the messagePars, the messagePars will be rendered again, but also the old value of stateRef.current will be used, and the value of stateRef.current will be updated again after the execution of useEffect.So the messagePars always use the previous state value, is it by design?
Thanks.
The text was updated successfully, but these errors were encountered: