DEV Community

Discussion on: Roadmap for React JS 2022

 
joelbonetr profile image
JoelBonetR 🥇

You don't use React in a MVC design pattern, simply because your server is not providing your view to the browser but "data" (usually in JSON format) that React (in this example) in the frontend will parse and handle to generate the actual views.
When you use Server Side Rendering (SSR) or Static Site Generation (SSG) then it's kinda sort of MVC (it will depend on the abstraction layers behind and the architecture).
If you use a Next JS which acts as a Backend, interacting with a Database and providing the view to pre-render it then yes, it's a MVC that it's hydrated afterwards with the reactive functionalities.
If you use a Next as middleware to handle that then usually it's not a MVC, you just have your services or microservices (in the language of your election, being laravel, lumen, Java Spring, Python, Node... whatever) that provide data to Next JS (next is fetching it) then you can have a MVVM for example...

When you split the backend and the frontend using microservices (and/or microfrontend) then the """integration""" is not like adding code inside code, it's about a piece of code providing code to another piece of code.