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

React Fiber (Zurich Edition)

Glenn Reyes
January 26, 2017
110

React Fiber (Zurich Edition)

Glenn Reyes

January 26, 2017
Tweet

Transcript

  1. • Complete rewrite of React core algorithm • Same Public

    API • Still being tested at Facebook internally • Release with v16 (pretty soon)
  2. ReactPriorityLevel { NoWork: 0, // No work is pending. SynchronousPriority:

    1, // For controlled text inputs. TaskPriority: 2, // Completes at the end of the current tick. AnimationPriority: 3, // Needs to complete before the next frame. HighPriority: 4, // Interaction that needs to complete soon LowPriority: 5, // Data fetching, or result from updating stores. OffscreenPriority: 6, // Won't be visible };
  3. yarn add react@next react-dom@next npm install —-save react@next react-dom@next //

    index.js import ReactDOM from ‘react-dom’; // default DOM
  4. yarn add react@next react-dom@next npm install —-save react@next react-dom@next //

    index.js import ReactDOMFiber from ‘react-dom/lib/ReactDOMFiber';
  5. yarn add react@next react-dom@next npm install —-save react@next react-dom@next //

    index.js import ReactDOMFiber from ‘react-dom/lib/ReactDOMFiber'; Don’t do this!!!
  6. Useful resouces • Things: github.com/koba04/react-fiber-resources • Beta: facebook.com/groups/reactfiberbeta • Chat:

    https://m.me/g/Abas8IcWxIvjVxHN • Tests: isfiberreadyyet.com • News: Follow GH issues & PRs (using “fiber” filter)