0% found this document useful (0 votes)
13 views2 pages

1 - Getting Started With React React-7

Uploaded by

Okanu Chinonso
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

1 - Getting Started With React React-7

Uploaded by

Okanu Chinonso
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Getting Started with React 1

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.

• React components can be created using a function or a class. Function-based


components are the preferred approach as they’re more concise and easier to work
with.

• 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.

Copyright 2023 Code with Mosh codewithmosh.com


fi
Getting Started with React 2

• 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.

• In browser-based apps, updating the DOM is done by a companion library called


ReactDOM. In mobile apps, React Native uses native components to render the
user interface.

• 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.

Copyright 2023 Code with Mosh codewithmosh.com


fl

You might also like