Live data from Hacker News

React v0.14

facebook.github.io

31–40 of 116 posts

Re: React v0.14

#31
post #3

A lot of great ideas in this release and it makes me excited for the future of React. I've been on 0.14-rc1 and my favorite feature so far is stateless function components. So much cleaner than class-based components. One downside is that hot reloading doesn't work with it yet (AFAIK). Hopefully that will come soon now that 0.14 is officially released. (And I believe Dan is/was on vacation.) Andrew Clark (core contri…

Note that the stateless part is mostly just a stepping stone to a stateful variant. https://github.com/reactjs/react-future/tree/master/07%20-%2...

Yep, I saw that, and that's even more exciting. Any possibility of 0.15 or 0.16 on that front?

Re: React v0.14

#32

The enthusiasm around React is infectious and I'm thinking about integrating it into one of my projects but I can't quite tell what exactly it's supposed to be used for. Is it only for SPAs or is it reasonable to consider react when you just want to add some interactions and dynamism to a page that was rendered server side? React seems kind of like an all-or-nothing approach. It seems like overkill if you just want t…

It's not a full framework like those. It's a View layer library.

Basically it controls everything about views.

Flux is a common pattern to use with it (and there's a lot of libraries out there for that) but you don't have to by any means.

Re: React v0.14

#33
I'm glad they separated out react from the DOM. This makes it much more likely that people will export the ideas and the API of React to other languages. The API is sane for data-flow programming and the lifecycle is well-defined. The separation of properties from state can be useful in other contexts.

Re: React v0.14

#34
post #3

A lot of great ideas in this release and it makes me excited for the future of React. I've been on 0.14-rc1 and my favorite feature so far is stateless function components. So much cleaner than class-based components. One downside is that hot reloading doesn't work with it yet (AFAIK). Hopefully that will come soon now that 0.14 is officially released. (And I believe Dan is/was on vacation.) Andrew Clark (core contri…

I also like stateless function components. If you are using Redux, all the state management can be done at Redux side and you can make all React components stateless. And they become even easier to write after this release.

Re: React v0.14

#35

React is cool. Switching to React helped me do : 1. Get rid of any jquery-like library. 2. Get rid of my HTML/Handlebars files :) 3. Generate dynamic CSS classNames for my components allowed me to get rid of stylesheets naming conventions / strategies ( BEM, etc. ) 4. With the help of Flux ( yahoo's implementation ) I got rid of writing two code-bases ( front-end / back-end ). Now I'm putting everything in one place,…

The light-weight structure that React imposes is what lets you get rid of jquery (and much of the plugins) and Handlebars/Mustache special syntax. React removes a layer of syntax and favours using plain old JavaScript.

Re: React v0.14

#36

React is cool. Switching to React helped me do : 1. Get rid of any jquery-like library. 2. Get rid of my HTML/Handlebars files :) 3. Generate dynamic CSS classNames for my components allowed me to get rid of stylesheets naming conventions / strategies ( BEM, etc. ) 4. With the help of Flux ( yahoo's implementation ) I got rid of writing two code-bases ( front-end / back-end ). Now I'm putting everything in one place,…

Can you explain 3.?

Re: React v0.14

#37
post #9

> Like always, we have a few breaking changes in this release. We know changes can be painful (the Facebook codebase has over 15,000 React components), so we always try to make changes gradually in order to minimize the pain. Since React is a semver project, from the website: > How do I know when to release 1.0.0? > If your software is being used in production, it should probably already be 1.0.0. If you have a stabl…

Is it a semver project? Doesn't seem like one, the whole idea is to raise major version when you break compatibility.

Only after a 1.0 release. 0.x implies that breaking changes are always possible

My experience has been that the React team provides plenty of advance warning with deprecation notices, similar to the experience of others I've never really been caught out by anything

The worst case I've dealt with is bringing an app from .12 to .13 after not touching the code for five or six months. It only took me a few hours to bring everything up to date.

Re: React v0.14

#38

React is cool. Switching to React helped me do : 1. Get rid of any jquery-like library. 2. Get rid of my HTML/Handlebars files :) 3. Generate dynamic CSS classNames for my components allowed me to get rid of stylesheets naming conventions / strategies ( BEM, etc. ) 4. With the help of Flux ( yahoo's implementation ) I got rid of writing two code-bases ( front-end / back-end ). Now I'm putting everything in one place,…

Can you please elaborate on 3.?

Re: React v0.14

#39
post #4
post #3

A lot of great ideas in this release and it makes me excited for the future of React. I've been on 0.14-rc1 and my favorite feature so far is stateless function components. So much cleaner than class-based components. One downside is that hot reloading doesn't work with it yet (AFAIK). Hopefully that will come soon now that 0.14 is officially released. (And I believe Dan is/was on vacation.) Andrew Clark (core contri…

Is it possible to build an entire app with them using Redux?

The Elm and Reagent (Clojurescript) communities build apps this way. It's theoretically possible to do everything in render in practice you wind up wanting to do things in other lifecycle events (e.g. display a google map) in most apps. There isn't any component local state but the components aren't pure render functions either.

Re: React v0.14

#40
post #3

A lot of great ideas in this release and it makes me excited for the future of React. I've been on 0.14-rc1 and my favorite feature so far is stateless function components. So much cleaner than class-based components. One downside is that hot reloading doesn't work with it yet (AFAIK). Hopefully that will come soon now that 0.14 is officially released. (And I believe Dan is/was on vacation.) Andrew Clark (core contri…

What exactly is different? I've been using "stateless function components" with react 0.12 and 0.13. Just write a function that returns a ReactElement, eg:

    function renderFoo(props) {
        return {props.foo};
    }
Then use it elsewhere in your code like a normal function:

    function bar(props) {
        return {props.foos.map(renderFoo)};
    }
Post reply on HN