diff --git a/types/react/experimental.d.ts b/types/react/experimental.d.ts index 848a2650ef997a..0e360019458ee3 100644 --- a/types/react/experimental.d.ts +++ b/types/react/experimental.d.ts @@ -142,8 +142,8 @@ declare module '.' { * * The `useTransition` hook returns two values in an array. * - * The first is a function that takes a callback. We can use it to tell React which state we want to defer. - * The seconda boolean. It’s React’s way of informing us whether we’re waiting for the transition to finish. + * The first is boolean, React’s way of informing us whether we’re waiting for the transition to finish. + * The seconda is a function that takes a callback. We can use it to tell React which state we want to defer. * * **If some state update causes a component to suspend, that state update should be wrapped in a transition.** * @@ -151,7 +151,7 @@ declare module '.' { * * @see https://reactjs.org/docs/concurrent-mode-reference.html#usetransition */ - export function unstable_useTransition(): [TransitionStartFunction, boolean]; + export function unstable_useTransition(): [boolean, TransitionStartFunction]; const opaqueIdentifierBranding: unique symbol; /** diff --git a/types/react/test/experimental.tsx b/types/react/test/experimental.tsx index 99894df7d44825..49c4182ed2c9b7 100644 --- a/types/react/test/experimental.tsx +++ b/types/react/test/experimental.tsx @@ -5,7 +5,7 @@ import React = require('react'); function useExperimentalHooks() { const [toggle, setToggle] = React.useState(false); - const [startTransition, done] = React.unstable_useTransition(); + const [done, startTransition] = React.unstable_useTransition(); // $ExpectType boolean done;