3 ms·
Could you share an example as to why you think JSX feels like inverted PHP? I think it is an interesting perspective.
by dleeftink 3y ago
Could you share an example as to why you think JSX feels like inverted PHP? I think it is an interesting perspective.
- CognitiveLens 3y agoI think the parent is referring to how you write PHP templates, which are HTML at the top level, but escape to raw PHP code inside particular delimiters (<?php>), whereas for JSX you write JS at the top level and 'escape' (kinda) to HTML in your returned element. Not exactly an inversion, but I can see the connection.
- itslennysfault 3y agoReally just the weird mix of xml and code PHP is sticking code (php) in html JSX is sticking xml (html-ish) in code (JavaScript)