React 19's use may need project rules in real-world work
One of the APIs added in React 19 is use. But for now, it does not feel like you can simply throw any Promise into it.
I have been doing various technical verifications, and for example, if you put something that fetches on the client into use, a warning appears in the console.
This is exactly as described in the React 19 RC documentation.
It includes this text:
> To fix, you need to pass a promise from a suspense powered library or framework that supports caching for promises.
If the Promise is received through a server action, the warning described in the documentation does not appear. But while making things myself, I realized that in source code it can be fairly hard to tell which Promise came through a server action.
For forms, useActionState makes various asynchronous processing relatively easy. Since it is no longer called useFormState, perhaps the intended uses are not limited to forms.
Incidentally, if it is not an uncached promise as mentioned in the warning, what happens is that writing a data fetching function with use can lead to repeated fetches.
To speak a little closer to real-world projects, if you inherit a React 19 project and extend it without building enough consensus, there may be cases where someone uses fetch inside a component with "use client" and warnings appear.
On the other hand, the documentation also says:
> In the future we plan to ship features to make it easier to cache promises in render.
So I will continue watching carefully to see how these problems are cleaned up in the future. If they can be handled well, I have high hopes that use and Suspense could make code much cleaner.
Maybe we will end up building infrastructure that hides these details.
The changes in React lately overlap in my mind with the old change from om to om-next. Even if something starts simple, as use cases expand, problems appear that are hard to solve without becoming more complex. Simplicity is best, but reality is not simple.
Complexification is not just becoming complex for its own sake. To solve complex problems simply, something like a paradigm shift inevitably happens, and some people can no longer keep up with the conceptual changes. Whether someone who understands the area to some degree can handle the initial design is really important.