We are all agreed that your theory is crazy. The question which divides us is whether it is crazy enough to have a chance of being correct. My own feeling is that it is not crazy enough.
- Niels Bohr
MVC is a modeling technique used in server (aka back end) software.
So, to be clear, MVC is not something you would implement in react. (edit: Technically you could, but that's not something that would involve a rest api. So not relevant here.)
Your react app would make https calls (often via axios or fetch api) to your server. That server interprets those requests using the MVC you've implemented.
For a more in depth explanation, you should research Node js and its indispensable library, Express. I've learned a lot about those from Academind on YouTube.
"MVC is a modeling technique used in server (aka back end) software."
A popular point of view, but it's not entirely true, MVC was invented by Trygve as an architecture for desktop applications. (source - folk.uio.no/trygver/2007/MVC_Origi... )
To be honest, trying to follow MVC(or MVA) is not something you really need to think about when designing an application.
@jouo
When designing programs, it is important what the components are responsible for, and what they do. Not the technical details of implementation, such as HTTP communication.
If we consider "model" as a domain model, there should not be any external dependencies, except Entity/Value objects that are part of it(like ProductProfile class can be part of Product).
If it's frontend for web application, just don't care about MVC.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
MVC is a modeling technique used in server (aka back end) software.
So, to be clear, MVC is not something you would implement in react. (edit: Technically you could, but that's not something that would involve a rest api. So not relevant here.)
Your react app would make https calls (often via axios or fetch api) to your server. That server interprets those requests using the MVC you've implemented.
For a more in depth explanation, you should research Node js and its indispensable library, Express. I've learned a lot about those from Academind on YouTube.
A popular point of view, but it's not entirely true, MVC was invented by Trygve as an architecture for desktop applications. (source - folk.uio.no/trygver/2007/MVC_Origi... )
What's now commonly called MVC actually is MVA
To be honest, trying to follow MVC(or MVA) is not something you really need to think about when designing an application.
@jouo
When designing programs, it is important what the components are responsible for, and what they do. Not the technical details of implementation, such as HTTP communication.
If we consider "model" as a domain model, there should not be any external dependencies, except Entity/Value objects that are part of it(like ProductProfile class can be part of Product).
If it's frontend for web application, just don't care about MVC.