PHP has some template library. For example, we want to show some variable inside a tag.
<h1>{{$var}}</h1>
It simply says: shows the variable var1 inside the “h1”
The goal of the template is:
- easily to code, so somebody that doesn’t know the language (such as web designer) could use it as ease.
- Avoid adding logic to the view
- SRP.
- And other considerations, such as a sandbox.
C# , Python, and Java have the same ideology.
So, what we want to avoid:
Add logic to the view layer.
React says the opposite: we add code and we mix js and jsx in the same sack. It breaks JSX in pieces and it’s impossible to add a web designer to react.
Even Vue has it and it is the reason why Vue is loved while React (while popular) is hated.
React developers do exactly the same than developers of other languages consider as a BAD CODE.