Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Conquering State

Conquering State

Why ReactJS (or something like it) is the Future of Front-end

A high-level overview of the concepts behind React and why it's not Just Another Framework.

Presenter's notes available on GitHub:
https://gist.github.com/matthewwithanm/a81b532ffb1d4c8b1fc0

Matthew Dapena-Tretter

May 02, 2014
Tweet

More Decks by Matthew Dapena-Tretter

Other Decks in Technology

Transcript

  1. • Need to support multiple environments • Broken APIs •

    Idiotic APIs • Insufficient tools for layout • Managing size/download time • Managing the load process itself
  2. A W B X C Y Z FUNCTION A W

    B X C Y Z NOT A FUNCTION
  3. WHAT IF WE THOUGHT OF THE DOCUMENT AS THE RESULT

    OF A FUNCTION THAT TOOK SOME INPUT AND RETURNED A DOM OBJECT?
  4. • We “get” functions • Functions are composable • Functions

    are testable • No need to recreate complicated event paths —just pass in the input and check the output
  5. BUT HOW? • Re-render the entire document every time there’s

    a state change? Every time somebody clicks? • Obviously too slow • Plain impossible for some things, like text areas. You would lose cursor position, etc.
  6. f? f = function(props, children) { return div(null, heading(null, props.title),

    ul( li(null, children[0]), li(null, children[1]) ) ); }