1 - Getting Started With React React-7
1 - Getting Started With React React-7
Getting Started
Terms
Components JSX
JavaScript Framework DOM
JavaScript Library Virtual DOM
Summary
• React is a JavaScript library for building dynamic and interactive user interfaces.
• In React applications, we don’t query and update the DOM. Instead, we describe our
application using small, reusable components. React will take care of ef ciently creating
and updating DOM elements.
• JSX stands for JavaScript XML. It is a syntax that allows us to write components that
combine HTML and JavaScript in a readable and expressive way, making it easier to
create complex user interfaces.
• When our application starts, React takes a tree of components and builds a JavaScript
data structure called the virtual DOM. This virtual DOM is different from the actual
DOM in the browser. It’s a lightweight, in-memory representation of our component
tree.
• When the state or the data of a component changes, React updates the
corresponding node in the virtual DOM to re ect the new state. Then, it compares
the current version of virtual DOM with the previous version to identify the nodes
that should be updated. It’ll then update those nodes in the actual DOM.
• Since React is just a library and not a framework like Angular or Vue, we often
need other tools for concerns such as routing, state management,
internationalization, form validation, etc.