Mixing client and server code is the new paradigm in React with Server Components. With the “use server” directive, you can run components exclusively on the server. This means that you can do things like write asynchronous database queries right in the component code. You might even mix SQL or a different language right in your JSX code.
I sincerely prefer the approach of Phoenix/LiveView.