NEW
Font size
WorksheetsLecture 07 (reacts)
Total questions: 10
Worksheet time: 5mins
What is React?
A database system
A JavaScript library for building user interfaces
A programming language
A backend framework
What is a key feature of React?
Direct DOM manipulation
SQL integration
Virtual DOM
File storage system
What does the Virtual DOM do?
Deletes HTML elements
Updates the whole DOM every time
Updates only the changed parts of the DOM
Stores data permanently
React components can be described as:
Only HTML elements
Database tables
CSS styles
Reusable building blocks for UI
What are the inputs to a React component?
HTML and CSS
Props and State
Functions only
Variables only
What is the difference between state and props?
Props can be changed, state cannot
State is read-only, props are editable
Props are read-only, state can change
No difference
Which method is used to update state in a React class component?
this.updateState()
this.changeState()
this.setState()
this.modifyState()
In ES6, which keyword has block scope?
var
class
function
let
What is an arrow function in ES6?
A way to create arrays
A shorter syntax for writing functions
A method for styling components
A database query
What is the purpose of props in React?
To store internal component data
To pass data from one component to another
To update the DOM directly
To style components
