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

The last 6 months of React

The last 6 months of React

Ally Beaton

April 26, 2018
Tweet

Other Decks in Technology

Transcript

  1. LOTS OF NEW STUFF IN REACT 16 • Fragments •

    Error Boundaries • Portals • Improved SSR • Fiber rewrite • Async rendering
  2. RETURN WHATEVER • Strings and numbers • Other react elements

    • Booleans • Fragments • Portals (more on this later…)
  3. ERROR BOUNDARIES • A component that wraps around a single

    or group of components • Catches any exceptions that have been thrown from the child/children component/s.
  4. OTHER SSR BENEFITS • Doesn’t need to be compiled •

    SSR markup uses more performant algorithm (doesn’t generate virtual DOM)
  5. STREAMING • You can start sending your document to the

    browser before everything has been generated • Reduces time to first byte (TTFB) • https://github.com/rherwig/template-react-16-ssr
  6. FIBER • React 15.x architecture was not able to support

    all requested features • Complete rewrite required • Ported all the tests from the existing react API
  7. NEW LIFECYCLE METHODS • componentWillMount, componentWillReceiveProps, and componentWillUpdate will be

    deprecated • getDerivedStateFromProps is being added as a safer alternative to the legacy componentWillReceiveProps. • getSnapshotBeforeUpdate is being added to support safely reading properties from e.g. the DOM before updates are made.
  8. CONTEXT • Context provides a way to pass data through

    the component tree without having to pass props down manually at every level. • Share data that can be considered “global” for a tree of React components • https://codepen.io/actuallyacat/pen/BxKzEa
  9. REACT RFC • For feature requests • Community driven process

    for development • https://github.com/reactjs/rfcs