DEV Community

Discussion on: High level view and logic separation in React

 
maharishicanada profile image
Dominic Mayers

Yes. What made me think differently was the description of the Limenius/react-bundle package:

limenius/react-bundle

Features include:

Prerender server-side React components for SEO, faster page loading, and users that have disabled JavaScript.
**Twig integration.**
Client-side render will take the server-side rendered DOM, recognize it, and take control over it without rendering again the component until needed.
Error and debug management for server and client side code.
Simple integration with Webpack.

If the whole point of React is to combine the markup organization together with the js organization, then what is the point of integrating it with Twig, which purpose is to do the markup separately? So, I understand what you are saying, but I am curious about what the Limenius team had in mind.

Thread Thread
 
tomekbuszewski profile image
Tomek Buszewski

Well, Dominic, the only way is to try and see :-)

Thread Thread
 
maharishicanada profile image
Dominic Mayers • Edited

Thanks for your reply. I guess what I did not explain well is that I am looking for interoperability or open standard. In React, there is a coupling between UI components and logic components at the global organization level, which prevents taking one side without the other. This is a limitation for interoperability, as you pointed out in the case of Twig. You suggested that the content side (stateful component, etc.) can be done in vanilla js. Following this clue, I looked around and found this. But then, in my opinion, what we really want is an open standard to allow the use of this kind of tools with different templating systems that only focus on the static structure. Moreover, for me and others, interoperability is by definition a permanent aspect of a global architecture that relates systems, not only a quality temporarily useful during a gradual transition from one system to React, as in React's "interoperability".

And thanks again. This interaction is very valuable to me. Your replies were enlightening. It could be that an open standard at this level is hard to think and/or will be too restrictive. I guess that I am looking for an explicit opinion on this subject.