This document discusses React.js best practices. It covers keynote speakers at React.js Conf 2016 who discussed React.js being more than a library and an emerging ecosystem. It also summarizes React features like being declarative, using virtual DOM and JSX, and being component-based. Additionally, it discusses related technologies like Redux, GraphQL and Relay and how they integrate with React.
In this document
Powered by AI
Overview of best practices in React.js development presented by SEA.YANG. Keynote speakers include Tom Occhino and Nick Schrock.
Overview of best practices in React.js development presented by SEA.YANG. Keynote speakers include Tom Occhino and Nick Schrock.
React is described as an ecosystem crucial for web and mobile development, backed by Facebook's investment.
Timeline of React's evolution from its initial version in June 2013 to version v15.1.0 in May 2016, highlighting key milestones.
Main features of React include Declarative APIs, Immutable Data, Virtual DOM, JSX, and Server Rendering.
Difference between imperative and declarative programming illustrated with examples, emphasizing the declarative approach.
Integration of HTML and CSS in JavaScript using React components and inline styles.
Emphasizes the concept of immutability, quoting Pete Hunt on shared mutable state as a detrimental factor.
Overview of data types in JavaScript with a focus on which types are immutable.
Techniques to optimize performance using shouldComponentUpdate, PureRenderMixin, and Immutability Helpers.
Redux introduced by Dan Abramov as a predictable state container for JavaScript apps alongside its evolution and related frameworks.
Core principles of Redux including immutability, pure functions, and the unidirectional data flow in React components.
Introduction to GraphQL, its advantages over REST, and its integration with Relay for data-driven React applications.
Conclusion of the presentation, questioning the future of React, and a quote by Tom Occhino on achieving perfection in development.
Conclusion of the presentation, questioning the future of React, and a quote by Tom Occhino on achieving perfection in development.
Jun 2013 Mar2015
Facebook
Inner Project
Public
Release v15.1.0
May 2016
May 2015
Initial Version
for iOS v0.26.2
May 2016Sep 2015
Initial Version
for Android
Evolution
Native
Oct 2015
v0.14.0
v0.13.0
ES6 support
Windows and Tizen are coming (Microsoft & Samsung)
Instagram
10.
React Features
• DeclarativeAPIs
• Immutable Data
• Virtual DOM
• JSX
• Component-Based
• Server Rendering (isomorphic)
• Learn Once, Write Anywhere
• Flux May2014
• Re-frame Dec 2014
• Relay Feb 2015
• Redux May 2015
• Om/next July 2015
Current Solutions
27.
Principle
• Single sourcefor whole application
• State is Immutable (read-only)
• Changes are made with Pure Functions
(previousState, action) => newState
28.
Pure Function
• Simplicity
•Fewer bugs
• Code re-use
• Easier to test
• High performance
https://en.wikipedia.org/wiki/Pure_function
e.g.
• sin(x)
• e => e * 2