Skip to content

Conversation

rickhanlonii
Copy link
Member

This example was busted because the setState after await wasn't inside startTransition. Also converted it to use the action prop naming pattern, and put the form on top so it doesn't move when you submit.

Copy link
Member

@sophiebits sophiebits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the form’s on top do you wanna prepend instead of append?

@rickhanlonii
Copy link
Member Author

@sophiebits good call, fixed

@rickhanlonii rickhanlonii merged commit d6c4c0f into reactjs:main Apr 29, 2025
6 checks passed
@rickhanlonii rickhanlonii deleted the rh/fix-uo-docs branch April 29, 2025 22:07
})
}
return <Thread messages={messages} sendMessage={sendMessage} />;
return <Thread messages={messages} sendMessageAction={sendMessageAction} />;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't really use the Action suffix convention if you do it this way because that implies that Thread wraps it in startTransition for you (which it could if you want to). That's what an Action is.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants