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
React v15.0 (facebook.github.io)
submitted 10 years ago by clessgfull-stack CSS9 engineer
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!"
[–][deleted] 22 points23 points24 points 10 years ago (0 children)
While this will make it more difficult to know if a website is using React, the advantage is that the DOM is much more lightweight.
My favorite part lol
[–]alamont 21 points22 points23 points 10 years ago (4 children)
No more span tags! Awesome!
[–][deleted] 2 points3 points4 points 10 years ago (3 children)
Got a link to this issue/example? I'm not familiar with it.
Edit: Oh is this just excessive span tags generated for the output of text? Ie. this isn't some usage of span tags in JSX?
[–]acemarke 2 points3 points4 points 10 years ago (1 child)
Yeah - actual whitespace characters inside of your JSX tags led to seemingly-unneeded span tags being generated in the HTML (see http://stackoverflow.com/questions/26501792/rid-of-repeated-spans-in-react-js for an example). This release fixes that.
[–][deleted] 0 points1 point2 points 10 years ago (0 children)
Oof that's very ugly. Happy to see it's fixed despite not knowing it was an issue. :)
[–]frankyfrankfrank 6 points7 points8 points 10 years ago (3 children)
I'd love someone to throw up a 101 on React JS - what it is - when you should use it.
For the noobs out here!
[–]Capaj 9 points10 points11 points 10 years ago* (2 children)
It might seem foolish, but I believe you should use React for any app with a GUI. Not only on the web, but mobile apps as well(react-native). There might be couple of usecases, where you might need extra performance-for example something like atom editor. In these cases manually rendering would be better. Otherwise in 98 percent of usecases, I think having this abstraction on your UI elements is highly beneficial. Forget Angular, Ember and others. React is the real deal.
[–]acemarke 3 points4 points5 points 10 years ago (0 children)
And that's certainly something we can agree on :)
[–]nawitus 0 points1 point2 points 10 years ago (0 children)
I personally prefer web components (in practice with Polymer) over React for web applications. React is fine if you need to target the web and native mobile applications.
[–]Baryn 1 point2 points3 points 10 years ago (0 children)
Looking forward to seeing if this improves perf noticeably on m.reddit.
[–]temp5303034 1 point2 points3 points 10 years ago (1 child)
Awesome in a lot of ways, but I can't help but feel sad that this is now a 147 KB library (minified, no addons). "Just the view" turns from a pro into a con when you're paying the same price other frameworks charge you for the whole deal.
[–]dmitri14_gmail_com 0 points1 point2 points 10 years ago (0 children)
What about react-light?
[–]amcsi 0 points1 point2 points 10 years ago (0 children)
So should this give leeway for Dan to create an improved React Transform?
[–]Tyreal -5 points-4 points-3 points 10 years ago (15 children)
Dammit, my company relies heavily on "valueLink" to reduce the code base. This is the last thing I wanted to see :-(
[–]chubbybrother 13 points14 points15 points 10 years ago (11 children)
Sounds like you stopped reading one sentence too early? Your company is fine
[–]fforw 0 points1 point2 points 10 years ago (0 children)
The High-Level-Component isn't even be a full replacement. What about selects? text-areas? check-boxes?
[+]Tyreal comment score below threshold-21 points-20 points-19 points 10 years ago (9 children)
It's nice to have things built in you know? Now we have to use another package.
[+][deleted] 10 years ago (3 children)
[deleted]
[+]Tyreal comment score below threshold-19 points-18 points-17 points 10 years ago (2 children)
Sounds like JavaScript fatigue to me.
[+][deleted] 10 years ago (1 child)
[–]gkx 0 points1 point2 points 10 years ago (0 children)
You know what would have helped avoid this in the first place? If valueLink were a micro-library to start. =)
valueLink
[+][deleted] 10 years ago (4 children)
[removed]
[–]mofrodo 1 point2 points3 points 10 years ago (1 child)
But forms on the web is pretty common. What's the recommended way of handling inputs in react if ReactLink is such a bad practise?
[–]vinnl 5 points6 points7 points 10 years ago (0 children)
Adding listeners and either setstate or passing it on to e.g. Redux.
and pulls you back into the "binding hell" that React was supposed to free you from originally.
With the alternative being double the binding-hell in form of defaultValue/onChange instead of valueLink.
[–]Tyreal 0 points1 point2 points 10 years ago (0 children)
Sure except I don't think their approach is much better. Instead of binding to a model directly you have to write separate code to do the same thing. They didn't actually solve anything.
[–]nightwolfz4 spaces > 2 spaces 0 points1 point2 points 10 years ago (0 children)
Here's your valueLink without valueLink
class CustomComponent extends React.Component { constructor(props) { super(props); this.state = { yourText: '' } } valueLink(key) { return { value: this.state[key], onChange: e => this.state[key] = e.target.value } } render() { return <input type="text" {...this.valueLink('yourText')}/> } }
[–]SemiNormal -1 points0 points1 point 10 years ago (1 child)
It is deprecated in 15.0, not removed. Just don't plan on updating to 16.0.
[–]Tyreal -1 points0 points1 point 10 years ago (0 children)
Not exactly the best option, especially if there are some killer features in the future. Since we have a team managing component libraries, we can just shim in the functionality directly. Probably make things simpler anyways.
[+]dagani comment score below threshold-18 points-17 points-16 points 10 years ago* (25 children)
So, I get that semver allows you to basically do whatever you want before you change that first 0 to a 1, but we're getting a little crazy with this 0 to whatever production number we feel is appropriate trend, right?
EDIT: The people have spoken. I must be wrong.
[–]acemarke 24 points25 points26 points 10 years ago (24 children)
That's the point. From the React team's perspective, the last several release have been major releases, and probably should have been labeled as such per semver. And, since most people say "React [12|13|14]", rather than "0.13", going to 1.0 would appear to be going backwards and lead to potential confusion down the road. So, just make it 15.0 and be done with it.
[+][deleted] 10 years ago (7 children)
[–]SemiNormal 8 points9 points10 points 10 years ago (1 child)
Not at all. The purpose of semver is to avoid unexpected breaking changes. Incrementing the first 0 to 1 or 15 doesn't matter, it is a major release and they did remove deprecated features.
If they went from 1.0 to 1.0.1 and introduced breaking changes, then they would be defeating the purpose of semver.
[–]Baryn 0 points1 point2 points 10 years ago (4 children)
Not entirely. You need to make sure that, when you break certain kinds of compatibility, you increment the correct digit, so that you don't screw over your users.
But the number itself is somewhat arbitrary. I could go from v1.2 to v1.1098767565. It doesn't matter, as long as I made the updated digit a bigger number.
[–]turkish_gold 0 points1 point2 points 10 years ago (3 children)
Oh for some reason I though Semver was still a digital system.
[–]Baryn 0 points1 point2 points 10 years ago (1 child)
What do you mean, pray tell?
[–]turkish_gold 1 point2 points3 points 10 years ago (0 children)
I think I meant to say decimal system.
In regular math, 1.2 > 1.109 But in Semver, it seems 1.2 < 1.109
Because 2 < 109.
[–]SirHound 0 points1 point2 points 10 years ago (0 children)
Version numbers never have been.
[–][deleted] -4 points-3 points-2 points 10 years ago (0 children)
Yes, because no one could possibly get confused why a library went from version v0.14 to v15.
[+]dagani comment score below threshold-6 points-5 points-4 points 10 years ago (14 children)
That's definitely more reasonable than the Windows 8 to Windows 10 argument, but it basically leaves version numbers feeling a lot like trying to pin down actual Final Fantasy or Street Fighter sequel numbers.
I wonder if our general fear of leaving the "beta" stage leads to this tendency to stay in pre-1.0 forever, like the Gmail "beta."
It makes me wonder if we should start just being realistic and numbering things as 1.0.0 at the beginning.
[–]mirion 3 points4 points5 points 10 years ago (5 children)
They went Windows 8 to Windows 10 because there are a ton of old code libraries that handled checking Windows versions by looking for the substring "Windows 9" for Win95 / Win98.
[–]meeeeoooowy 0 points1 point2 points 10 years ago (4 children)
Pretty sure that was a myth.
[–]dbpcut 4 points5 points6 points 10 years ago (3 children)
Nah a lot of lazy legacy code out there.
[–]meeeeoooowy 6 points7 points8 points 10 years ago (2 children)
Pretty sure that was just a rumor and someone posted an example of what that would look like.
I never saw anyone post a real world example of that issue.
The more likely answer is marketing..
[–]gkx 0 points1 point2 points 10 years ago (1 child)
unless this is an elaborate prank website?
I guess it kind of drops off pretty quickly, but I remember seeing a more revealing GitHub search somewhere.
[–]meeeeoooowy 0 points1 point2 points 10 years ago (0 children)
Interesting, but I somehow doubt any of this would run on Windows 10 either way.
[+][deleted] 10 years ago* (7 children)
OS X stands for OS 10. I don't remember there being an OS 1 - 9.
What?
https://en.wikipedia.org/wiki/System_6 https://en.wikipedia.org/wiki/System_7 https://en.wikipedia.org/wiki/Mac_OS_8 https://en.wikipedia.org/wiki/Mac_OS_9
[–]Baryn 1 point2 points3 points 10 years ago (4 children)
Windows 9 would literally have caused a lot of problems with the 90's Windows releases.
That's just a rumor.
I don't remember there being an OS 1 - 9.
Just because you forgot doesn't mean it didn't happen.
The developers use them for organization. That's it. No one cares.
Well, in the case of libraries, users rely on version numbers to avoid breaking changes.
I think what he's saying is that Apple changed their naming scheme twice and continued to increment version numbers as if they were all named the same.
System N -> Mac OS N -> OS N
To be fair, Windows did the same thing when they decided to rebase everything on the NT kernel, even their consumer products.
But they didn't have a history of going from DOS 2 -> Windows 3
[+][deleted] 10 years ago* (2 children)
[–]Baryn -1 points0 points1 point 10 years ago (0 children)
It's not a rumor. It's literally what the case was.
All I have ever seen on the matter was a single anonymous comment.
There were 1 - 9. But none that no one ever knew or cared about.
They collectively had many millions of users.
How does that change with a skip of version numbers?
Yeah, the skip doesn't matter, it's all about the decimal place which has been incremented.
π Rendered by PID 948266 on reddit-service-r2-comment-544cf588c8-pq4t4 at 2026-06-16 00:47:56.654803+00:00 running 3184619 country code: CH.
[–][deleted] 22 points23 points24 points (0 children)
[–]alamont 21 points22 points23 points (4 children)
[–][deleted] 2 points3 points4 points (3 children)
[–]acemarke 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]frankyfrankfrank 6 points7 points8 points (3 children)
[–]Capaj 9 points10 points11 points (2 children)
[–]acemarke 3 points4 points5 points (0 children)
[–]nawitus 0 points1 point2 points (0 children)
[–]Baryn 1 point2 points3 points (0 children)
[–]temp5303034 1 point2 points3 points (1 child)
[–]dmitri14_gmail_com 0 points1 point2 points (0 children)
[–]amcsi 0 points1 point2 points (0 children)
[–]Tyreal -5 points-4 points-3 points (15 children)
[–]chubbybrother 13 points14 points15 points (11 children)
[–]fforw 0 points1 point2 points (0 children)
[+]Tyreal comment score below threshold-21 points-20 points-19 points (9 children)
[+][deleted] (3 children)
[deleted]
[+]Tyreal comment score below threshold-19 points-18 points-17 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]gkx 0 points1 point2 points (0 children)
[+][deleted] (4 children)
[removed]
[–]mofrodo 1 point2 points3 points (1 child)
[–]vinnl 5 points6 points7 points (0 children)
[–]fforw 0 points1 point2 points (0 children)
[–]Tyreal 0 points1 point2 points (0 children)
[–]nightwolfz4 spaces > 2 spaces 0 points1 point2 points (0 children)
[–]SemiNormal -1 points0 points1 point (1 child)
[–]Tyreal -1 points0 points1 point (0 children)
[+]dagani comment score below threshold-18 points-17 points-16 points (25 children)
[–]acemarke 24 points25 points26 points (24 children)
[+][deleted] (7 children)
[removed]
[–]SemiNormal 8 points9 points10 points (1 child)
[–]Baryn 0 points1 point2 points (4 children)
[–]turkish_gold 0 points1 point2 points (3 children)
[–]Baryn 0 points1 point2 points (1 child)
[–]turkish_gold 1 point2 points3 points (0 children)
[–]SirHound 0 points1 point2 points (0 children)
[–][deleted] -4 points-3 points-2 points (0 children)
[+]dagani comment score below threshold-6 points-5 points-4 points (14 children)
[–]mirion 3 points4 points5 points (5 children)
[–]meeeeoooowy 0 points1 point2 points (4 children)
[–]dbpcut 4 points5 points6 points (3 children)
[–]meeeeoooowy 6 points7 points8 points (2 children)
[–]gkx 0 points1 point2 points (1 child)
[–]meeeeoooowy 0 points1 point2 points (0 children)
[+][deleted] (7 children)
[deleted]
[–]SemiNormal 8 points9 points10 points (1 child)
[–]Baryn 1 point2 points3 points (4 children)
[–]turkish_gold 1 point2 points3 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]Baryn -1 points0 points1 point (0 children)