In this example from react docs, I can remove use hook from const messageContent = use(messagePromise); leaving it like this const messageContent = messagePromise; and it still works (no error is thrown, suspense is triggered). The only difference is that use suspends component's rendering, while without use it re-renders various times until the promise gets resolved.
This is weird. How does react works when you don't use use hook here? Where can I read about this?
function Message({ messagePromise }) { const messageContent = use(messagePromise); // !!! weird. this still works, only re-renders more times. // const messageContent = messagePromise; return <p>Here is the message: {messageContent}</p>; } export function MessageContainer({ messagePromise }) { return ( <Suspense fallback={<p>⌛Downloading message...</p>}> <Message messagePromise={messagePromise} /> </Suspense> ); }