Live data from Hacker News

React v0.13.0 Beta 1

facebook.github.io

61–70 of 77 posts

Re: React v0.13.0 Beta 1

#61
post #34

Like classes matter. JS doesn't even have them, not in ES6, not in ES7. It's all just sugar for prototypal inheritance, which has nothing to do with OOP. I don't see any future for OOP in JS land. They'd be better off investing time in reducing side-effects, and the enormous size the library sports.

This is actually a way to eventually reduce the size of the library since it makes the class system optional.

We're definitely considering optional module based systems instead of OOP, but it's still too early. https://github.com/reactjs/react-future/tree/master/07%20-%2...

Re: React v0.13.0 Beta 1

#62
post #31

I'm disappointed to see this prioritized over, say, a focus on reduced library size or simply getting to a stable 1.0 release. I'm not sure how this moves React forward, though I'm sure it's a "nice to have" for some people. Still, perhaps we'll learn more about the roadmap and goals of the team at the React conference this week.

The point of this is exactly to reduce the library size AND getting to a stable 1.0 release. By making the class system optional, it becomes an optional dependency which reduces the library size. Supporting only createClass in a stable 1.0 release would mean that we're stuck with that dependency.

The way we see it, ES6 and 7 are around the corner and then the createClass dependency becomes optional.

Re: React v0.13.0 Beta 1

#63
post #31

I'm disappointed to see this prioritized over, say, a focus on reduced library size or simply getting to a stable 1.0 release. I'm not sure how this moves React forward, though I'm sure it's a "nice to have" for some people. Still, perhaps we'll learn more about the roadmap and goals of the team at the React conference this week.

Are we still arguing about file-size size? Gzip? Its smaller than a medium-to-small .jpeg image, and connections are only getting faster. No need to loose sleep over mere perceptions!

Re: React v0.13.0 Beta 1

#64
Looks like they removed autobinding. When I first saw React, I thought about new JS developers maybe being led astray by React's magic handling of "this" scope. So I'm glad they removed the magic. But, doesn't this break backwards compatibility? Or does "createClass" keep autobinding while the new class model loses it?

Re: React v0.13.0 Beta 1

#65
post #64

Looks like they removed autobinding. When I first saw React, I thought about new JS developers maybe being led astray by React's magic handling of "this" scope. So I'm glad they removed the magic. But, doesn't this break backwards compatibility? Or does "createClass" keep autobinding while the new class model loses it?

Yep, createClass keeps autobinding

Re: React v0.13.0 Beta 1

#66
post #53
post #20

Earlier quoted context omitted.

Not what you're looking for exactly, but you could settle for using Jade? https://github.com/duncanbeevers/jade-react

Looks nice. Just a heads up though it uses React.DOM to create your tags which has been deprecated (and possibly won't be available anymore come 0.13).

React.DOM is still in 0.13.

Re: React v0.13.0 Beta 1

#67
post #2

Nice! I think that if you use vanilla JS (even ES6), the class support adds more hassle than the gains it provides. For example, setting proptypes completely at the bottom of the file seems, well, cumbersome. It's a bit like putting a function signature after the function body. From that perspective, using the old React.createClass syntax seems to keep everything together a bit nicer. However, if you want to use e.g.…

Similarly, I'm looking for a way to use react with HAML. I just can't give it up, I have absolutely no interest in closing my tags ever again. One of the things I like about angular is how it deals with standard HTML. HAML doesn't care about its wacky attributes. Whats the best way to achieve this with react? Does the JSX compiler have hooks for preprocessing of any kind?

It's not quite the same as HAML, but you might try JSnoX: https://github.com/af/JSnoX

Re: React v0.13.0 Beta 1

#68
post #3

I'm a bit scared of what will replace mixins. I've worked with C++ code bases where inheritance went crazy, and also with C++ code bases where composition via components was well supported and somewhat enforced. I'd love to see ES building in some kind of default support for composition with components if mixins are out. See also how Unity3D does it: http://docs.unity3d.com/Manual/UsingComponents.html I'm very happy…

love that you mention how Unity handles components. Since I started using React I've been dreaming of an editor that acts like Unity WRT components, and the properties you edit are inferred from `getDefaultProps` and `getDefaultProps`.

Re: React v0.13.0 Beta 1

#69
post #50

Earlier quoted context omitted.

Our problem with TypeScript is not TypeScript but its community and ecosystem for the most part (I think that's a way I would put it).

It's the first time I heard that, though I admit I'm not really actively involved in any type of TS community. All I've been in contact with are the TS releases and blogpost from the TS development team, for which I can only give credits (quite fast and stable development with good features), and some TS projects and definition files for existing libraries I found on github which were pretty decent and helpful. As na…

The homepage, forums and press releases do seem really focus on Visual Studio. I guess that's understandable given it's an MS product.

There are a couple of links to editor syntax files and a link to WebStorm but they're a bit of an after thought.

I keep expecting the homepage update "any day now" but so far I've only really seen VS mentioned as a default environment.

Re: React v0.13.0 Beta 1

#70
post #53

Earlier quoted context omitted.

Looks nice. Just a heads up though it uses React.DOM to create your tags which has been deprecated (and possibly won't be available anymore come 0.13).

React.DOM is still in 0.13.

Thanks, good to know. That gives us a nice path to upgrade our CoffeeScript components.
Post reply on HN