Answer the question
In order to leave comments, you need to log in
How does reactjs work?
cms was enough for me for two years, now it's modx, but now I want to use the react js library, and generally study how the mvc and flux architecture works.
1. The most practical question. I can’t understand if it will be any use if I write a template in react and stick snippets and chunks into the components. After all, the page is formed by modx itself?
I feel like I don't know some technology that is obvious to everyone - I don't have a technical background, so it's quite possible.
I also seem to understand what it means "react is a visual component in the mvc architecture"
3. but then it's not clear how the flux architecture is involved here? it's an alternative to mvc, isn't it? Unfortunately, I did not find the answer to this question in the react.js documentation.
Here's how I understand it: react js has a high performance due to the fact that it does not render the entire page again each time, but only individual "components".
2. And if the page is completely reloaded, what happens? Is there any sense from react in this case?
In general, dear experts, I feel that my knowledge in this area is like a puzzle in which some big piece or pieces are missing.
4. What do I need to learn to fill these gaps and become able to put into practice knowledge of react js? English-language sources of information are also suitable. The format is predominantly video.
Answer the question
In order to leave comments, you need to log in
1. Roughly speaking, there is 1 page to which the data comes via the REST interface with ModX and it does not directly participate in the rendering. By itself, the react renders the page in pieces (components), but inside there is no good mechanism for checking whether these pieces need to be changed in the DOM tree - there is PureRenderMixin, but often you need to fuss with your hands.
2. No, this page should not be reloaded, and React is of no use in this case. React is a template engine in MVC, it does not work with the model and there is no business logic in it.
3. Flux is Orthodox CQRS-ES, and has nothing to do with modx directly. There is no full-fledged implementation of this pattern, according to all the canons and with SOA. So do not bother. PHP/Python/Ruby is pretty ill-suited for this sort of thing, as it needs async/threading right out of the box, and without crutches like gearmand or celery.
4. You need to poke around in the react itself - there are a lot of shortcomings and shortcomings, but now this is the most complete and type-safe solution for rendering through VirtualDOM.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question