Settings

Theme

React v0.8 is out

facebook.github.io

96 points by zpao 12 years ago · 15 comments

Reader

tegeek 12 years ago

Any framework like React (which embeds html tightly with javascript) is flawed at its core.

HTML itself is declarative in nature. All frameworks should embrace this.

By looking at React docs, I can tell you from my experience that it'll be pain in the s to maintain a large scale React application.

AngularJs' declarative way gives an app maintainability and highly test-ability. These two things are not the luxury but a must have requirement for any large scale long-live application.

  • peterhunt 12 years ago

    Here's my talk from JSConf EU that directly tackles those concerns. http://2013.jsconf.eu/speakers/pete-hunt-react-rethinking-be...

  • jonahx 12 years ago

    The React devs are well aware of what they are doing, and argue that they are merely coupling technologies, not coupling design concerns:

    http://www.youtube.com/watch?v=x7cQ3mrcKaY&list=FLuFwYXJkbMi...

    Of course you're free to agree or disagree with their argument, but I wouldn't assume they are just newbs who are unaware of standard best practices. They know the "rules" and are breaking them consciously.

  • brandonbloom 12 years ago

    1) I totally disagree about embedding HTML, but it's optional anyway. Cohesion counts. See Pete Hunt's video.

    2) React programs tend to be very "dearative" in my eyes. Any declarative language still needs abstraction facilities: ie functions.

    3) you can trivially implement any "more declarative" model you want on top of React's stellar core.

    4) all of the benefits of test ability from angular apply to react too

    Sorry about typos, on phone

    • tegeek 12 years ago

      <tabManager background=blue> <tab closeButton=true> Hello {{propertyName}} </tab> </tabManager>

      This is what you typically get at the end in an Angular app. You don't need to "figure out" things where they are and what they are, and what they do in DOM.

      Show me this declarative thing in React.

      And this is just one part of Angular.

      • tallowen 12 years ago

        For what its worth,

        <tabManager background={'blue'}> <tab closeButton={true}> Hello {this.props.Name} </tab> </tabManager>

        Would be valid in react.

        Check out http://facebook.github.io/react/#todoExample, specifically the render function.

        I think this is pretty easy to understand:

              <div>
                <h3>TODO</h3>
                <TodoList items={this.state.items} />
                <form onSubmit={this.handleSubmit}>
                  <input onChange={this.onChange} value={this.state.text} />
                  <button>{'Add #' + (this.state.items.length + 1)}</button>
                </form>
              </div>
      • jacktoole1 12 years ago

        I don't have any practical experience with angular (but I'd like to, and definitely think its testability is a step in the right direction).

        That said, I've found react to be very declarative, especially over the raw jQuery and Backbone I'd used before. Most of the components I write have no state, and render() declares how to render them from any state, without having to worry about how to change things on state changes.

  • danh 12 years ago

    With React, you get to choose the parts of your code that integrate tightly which each other. Choice is good.

    And if you don't like html in js, you could always embed ClojureScript in ClojureScript :-):

    https://github.com/holmsand/cloact

spicyj 12 years ago

As I said here the last time a new React version came out, we're using React for more or less all new JS development at Khan Academy, and we're loving it.

Happy to answer questions.

dugmartin 12 years ago

I just read through all the React docs and the tutorial. My first impression is it looks and reads like Flex for Javascript, both for the JSX markup and the component lifecycle events. I'm not saying that is a bad thing, just an observation.

kleiba 12 years ago

Damn, from misreading the headline I thought ReactOS had jumped up a few version numbers.

  • zpaoOP 12 years ago

    Sorry to get your hopes up! I'll try to remember to make it a bit more obvious next time.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection