One of the coolest parts of React is the ability to take logic within a component and extract it to a reusable chunk (a custom hook or component). Let's take the logic around our resource to create a custom hook for creating a React Suspense resource.
I did not get why the dependency over startTransition
in the useLayoutEffect. Could you please clarify the need for this.