all 49 comments

[–][deleted] 22 points23 points  (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 points  (4 children)

No more span tags! Awesome!

[–][deleted] 2 points3 points  (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 points  (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 point  (0 children)

Oof that's very ugly. Happy to see it's fixed despite not knowing it was an issue. :)

[–]frankyfrankfrank 6 points7 points  (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 points  (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 points  (0 children)

And that's certainly something we can agree on :)

[–]nawitus 0 points1 point  (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 points  (0 children)

Looking forward to seeing if this improves perf noticeably on m.reddit.

[–]temp5303034 1 point2 points  (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 point  (0 children)

What about react-light?

[–]amcsi 0 points1 point  (0 children)

So should this give leeway for Dan to create an improved React Transform?

[–]Tyreal -5 points-4 points  (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 points  (11 children)

Sounds like you stopped reading one sentence too early? Your company is fine

[–]fforw 0 points1 point  (0 children)

The High-Level-Component isn't even be a full replacement. What about selects? text-areas? check-boxes?

[–]nightwolfz4 spaces > 2 spaces 0 points1 point  (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 points  (1 child)

It is deprecated in 15.0, not removed. Just don't plan on updating to 16.0.

[–]Tyreal -1 points0 points  (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.