quiz 4 reviewer advanced web

0.0(0)
Studied by 3 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/19

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 8:23 AM on 8/25/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

20 Terms

1
New cards

React Event

An action performed by the user or the browser (such as clicking a button, hovering, or typing) that React listens for and responds to by executing a function.

2
New cards

React State

A built-in React object used to store data that may change over time; when state changes, the component automatically re-renders to display the latest data in the UI.

3
New cards

useState Hook

A built-in React Hook that allows functional components to store and update data, preserving state values across component re-renders.

4
New cards

Stateless Component

A component that does not manage its own state; it receives data from its parent component via Props and renders the user interface.

5
New cards

Presentational Component

Another name for a Stateless Component, so-called because its primary role is to present/display information without handling state logic.

6
New cards

onClick

An event handler triggered when a user clicks an element.

7
New cards

onDoubleClick

An event handler triggered when a user double-clicks an element.

8
New cards

onChange

An event handler triggered when the value of an input element changes.

9
New cards

onSubmit

An event handler triggered when a form is submitted.

10
New cards

onMouseEnter

An event handler triggered when the mouse pointer enters the boundary of an element.

11
New cards

onKeyDown

An event handler triggered when a keyboard key is pressed down.

12
New cards

onKeyUp

An event handler triggered when a keyboard key is released.

13
New cards

React Event Naming Convention

React uses camelCase for event names (e.g., onClick instead of standard HTML onclick).

14
New cards

Event Handler Syntax in React

Event handlers are passed inside curly braces as a function reference without parentheses (e.g., onClick={clickMe}) so they execute only when triggered, not upon initial render.

15
New cards

Passing Parameters in React Events

Done by wrapping the function call in an arrow function (e.g., onClick={() => greet("Name")}) to prevent the function from running immediately when rendered.

16
New cards

useState Syntax Breakdown (const [state, setState] = useState(initialValue))

• state: Holds the current state value.

• setState: The function used to update the state value.

• initialValue: The starting value assigned to the state.

17
New cards

setState()

The method used in older React Class Components (this.setState()) to update component state.

18
New cards

setState() vs. useState()

• setState(): Used in Class Components, requires this.setState(), requires more code, and is the older (legacy) approach.

• useState(): Used in Functional Components, uses hooks, requires less code, and is the modern, recommended approach.

19
New cards

Characteristics of Stateless Components

• Do not use useState() or setState().

• Receive data solely via Props.

• Focus strictly on displaying UI.

• Easy to reuse, test, and maintain.

20
New cards

Examples of Stateless Components

Headers, Navigation Bars, Footers, Company Logos, Product Cards, and User Profile Cards.