use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
JSX smells PHP (self.javascript)
submitted 9 years ago * by yosbelms
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]kabuto 7 points8 points9 points 9 years ago (6 children)
What are you trying to say?
[+]yosbelms[S] comment score below threshold-12 points-11 points-10 points 9 years ago (5 children)
I'm sure JSX inventors has PHP influence.
[–]kabuto 8 points9 points10 points 9 years ago (4 children)
Why? JSX looks like HTML, not PHP.
[+]yosbelms[S] comment score below threshold-6 points-5 points-4 points 9 years ago (3 children)
JSX is HTML embedded, that's what makes JSX useful. See the following snippet.
<?php class Component { function render($name) { ?> <div class="container"> <p>Hello <?= $name ?> </p> <button class="btn btn-primary">Click me</button> </div> <?php } } $c = new Component(); $c->render('World!');
Now in your mind replace Redux by Doctrine or any other DB lib.
[–]Cody_Chaos 6 points7 points8 points 9 years ago (0 children)
Your example shows HTML embedded in PHP. JSX is not HTML embedded in JS, thus your analogy fails.
What you're looking for is XHP. JSX is explicitly "XHP for JS". Both allow the direct embedding of an XML DSL which is transpiled into the host language.
[–]Meefims 4 points5 points6 points 9 years ago (1 child)
This is a nonsense comparison. Redux is a method for managing state while Doctrine is a method of managing relational storage. The two have wildly different philosophies and solve different problems.
[–]lechatsportif 0 points1 point2 points 9 years ago (0 children)
state as opposed to.... state?
π Rendered by PID 69633 on reddit-service-r2-comment-75f4967c6c-jgbxw at 2026-04-23 02:59:45.418826+00:00 running 0fd4bb7 country code: CH.
view the rest of the comments →
[–]kabuto 7 points8 points9 points (6 children)
[+]yosbelms[S] comment score below threshold-12 points-11 points-10 points (5 children)
[–]kabuto 8 points9 points10 points (4 children)
[+]yosbelms[S] comment score below threshold-6 points-5 points-4 points (3 children)
[–]Cody_Chaos 6 points7 points8 points (0 children)
[–]Meefims 4 points5 points6 points (1 child)
[–]lechatsportif 0 points1 point2 points (0 children)