Redux / React and MVC, OOP

Can React / Redux be seen as an MVC environment that also captures basic object-oriented principles? In my experience, we have a thick model (global state/store) and skinny controllers ( actions creators) that dispatchperform certain actions in the right direction ( action typesused in Reducers) to create a new state object and hydrate our views (React).

I think React includes abstraction through componentsand subcomponents, inheritance / polymorphism, extending the Component class to write your own. And it seems to me that containersit allows you to feel the encapsulation, which hides / shows a certain reduction function in / out of the components.

This is how I thought about the Redux / React architecture, but I'm not sure if this is correct. Are there any key points or differences?

+4
source share
1 answer

Why do you need OOP principles? The Redux and React-redux libraries are dedicated to functional programming. Take a look at this video first - https://vimeo.com/69255635 , then a free online course from the author of Redux - https://egghead.io/lessons/javascript-redux-the-single-immutable-state-tree

+2
source

Source: https://habr.com/ru/post/1624431/


All Articles