React in Action

Chapter 1. Meet the React

  1. “React is a declarative, component-based library for building user interfaces that works on a variety of platforms: web, native, mobile, server, desktop, and even on virtual reality platforms going forward (React VR).”

“This leads to our first tradeoff: React is primarily concerned with the view aspects of UI. This means it’s not built to do many of the jobs of a more comprehensive framework or library. ”

  1. First Level Cache and Second Level Cache in Hibernate ???

  1. “React’s APIs provide “escape hatches” that let you drop down into lower levels of abstraction. ”

  2. Virtual DOM

“The DOM, or Document Object Model, is a programming interface that allows your JavaScript programs to interact with different types of documents (HTML, XML, and SVG).”

“At a high level, the DOM is a tree structure that reflects the hierarchy of an XML document. ”

“document.findElemenyById, querySelectorAll, alert, and so on”

“When a DOM element is accessed, modified, or created, the browser is often performing a query across a structured tree to find a given element. ”

“React can perform intelligent updates and only do work on parts that have changed because it can use heuristic diffing to calculate which parts of the in-memory DOM require changes to the DOM. ”

  1. Component

“Components in React are meant to work together. This means you can compose together components to form new composite components.”

Chapter 2. First Component

comments powered by Disqus