Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

JSX and PHP are actually seriously different. When you break out of PHP, you're just outputting text to standard output. When you're using JSX syntax, you're constructing Javascript objects that can be manipulated using standard javascript techniques. Anyone who believes they're comparable seriously doesn't understand the task that is before them.


Oh please, I professionally use both daily (enjoy them both), but even I can see JSX is just PHP with extra steps.


Though not JSX, with TSX you get type checking with your markup.


My reading of this thread is that people are comparing JSX as a templating language to PHP as a templating language, splicing PHP <? ... ?> into HTML like how we have { ... } in JSX. At the end of the day React lets you write a function that returns HTML just like a PHP file.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: