react.dev icon indicating copy to clipboard operation
react.dev copied to clipboard

Is this demo in the React doc an incorrect usage of startTransition?

Open ZJRui opened this issue 2 months ago • 0 comments

Image https://react.dev/reference/rsc/server-functions#server-functions-with-actions

  1. Shouldn't setError and setName need to be wrapped with a new startTransition?
  2. It seems meaningless to apply startTransition to await updateName in the document, doesn't it?

https://react.dev/reference/react/useTransition#react-doesnt-treat-my-state-update-after-await-as-a-transition

ZJRui avatar Nov 24 '25 08:11 ZJRui