ReactJS Cert

Ace your homework & exams now with Quizwiz!

What are the benefits of using components?

- Each piece of UI is simple and easy to develop - One piece can be reused in other places - It is easy to modify one piece of the UI without having to touch the whole website

How does the Virtual DOM work?

- The initial virtual DOM is an exact representation of the actual DOM - When anything needs to be changed it does not compare with the actual DOM. Instead it compares which parts of the Virtual DOM needs changes. This makes it faster - Instead of re-painting or re-positioning for every change, it creates a collection or batch of changes in the Virtual DOM - It repaints only those areas in which the DOM has been changed

Why use React?

- its simplicity and ease of use - supports re-usability of components - is a SPA - React gives us the best performance in manipulating the DOM

Key Features of React?

- lightweight and easy to use - high performance DOM manipulation - data passed around is immutable - flexibility to use other libraries - manages the state of the UI and updates only specific portions of the DOM

What are the 2 main things React caters to?

1) Rendering elements on the page efficiently 2) Handling events

What is the id for the div tag that renders our Index.js

<div id="root></div>

What is JSX?

JSX is a special syntax introduced in ReactJS to write presentation code (JSX is converted to JS, as the browser does not understand JSX using a JS compiler called Babel)

Does the Virtual DOM exist in the browser?

No

What is ReactJS

ReactJS is a javascript library used for building user interfaces in web and mobile apps

T/F: The Virtual DOM in React actually updates only specific portions of the DOM?

True

What is <React.Fragment></React.Fragment> used for?

Used instead of wrapping multiple elements inside of an unnecessary div tag in rendering JSX elements (best practice)


Related study sets

[Chapter 7.8 - Windows and Application Troubleshooting] TestOut PC Pro

View Set

ANATOMY AND PHYSIOLOGY II; "THE ENDOCRINE SYSTEM"

View Set

Chapter 17. Science, the Environment, and Society

View Set

Chapter 3. The Age of Exploration

View Set

Philosophy Here and Now: Chapter 1 Philosophy and You

View Set

international law final exam: past exam/ quiz MC and TF questions

View Set

Algebraic and Verbal expressions

View Set