2 ms·
React probably closer to being just the View than MVC or any other paradigm. It doesn't even have any model layer. Components in React take a set of properties
by underwater 13y ago
React probably closer to being just the View than MVC or any other paradigm. It doesn't even have any model layer.
Components in React take a set of properties and implement a render function that transforms those properties into a view (usually by rendering other high-level React components rather outputting plain old HTML). Instead of manually maintaining view state you just render from scratch each time; hence the description of pure functions in parent comment.
Usually this would be a terrible idea because it would kill browser performance and lead to extra complexity in registering/unregistering event handlers, etc. but React implements a framework that ensures the minimum number of DOM interactions happen.