Home
Explore
Exams
Login
Get started
Home
APP DEV focus test
APP DEV focus test
0.0
(0)
Rate it
Studied by 0 people
Call Kai
Learn
Practice Test
Spaced Repetition
Match
Flashcards
Knowt Play
Card Sorting
1/35
There's no tags or description
Looks like no tags are added yet.
36 Terms
View all (36)
Star these 36
1
New cards
Component
A reusable piece of UI, written as a function that returns JSX
2
New cards
JSX
HTML-like syntax inside JavaScript that describes what to show on screen
3
New cards
Props
Data passed into a component from its parent (read only)
4
New cards
State
Data that lives inside a component and can change over time
5
New cards
Hook
A special function (starts with "use") that gives function components features like state and lifecycle
6
New cards
State variable
The first value from useState; holds the current value
7
New cards
Setter function
The second value from useState; updates the state and triggers a re-render
8
New cards
Re-render
React redrawing a component after its state or props change
9
New cards
Lifecycle
The stages of a component: mount (appears), update (changes), unmount (removed)
10
New cards
Mount
When a component first appears on screen
11
New cards
Side effect
Work outside of drawing the UI, like fetching data, timers, or listeners
12
New cards
useState
A hook that lets a component store a value that can change. Returns [state variable, setter function]
13
New cards
useEffect
A hook that runs side effects after a component renders, like fetching data
14
New cards
Dependency array
The second argument of useEffect that controls when it runs
15
New cards
Dependency array: none
useEffect runs after every render
16
New cards
Dependency array: []
useEffect runs once, when the component mounts
17
New cards
Dependency array: [value]
useEffect runs on mount and whenever value changes
18
New cards
Cleanup function
A function returned from useEffect that runs when the component unmounts
19
New cards
Conditional rendering
Showing different JSX depending on a condition, using an if statement, a ternary, or &&
20
New cards
Ternary operator
condition ? a : b returns a if true, b if false
21
New cards
Logical &&
condition && a returns a only if the condition is true
22
New cards
API
A service your app talks to for data, through requests and responses
23
New cards
Endpoint
A specific URL in an API for a specific resource (base URL + path)
24
New cards
HTTP method
The type of request: GET (get data), POST (send data), PUT (update), DELETE (remove)
25
New cards
fetch()
Built in function that makes a request to an endpoint and returns a promise
26
New cards
JSON
A text format for data, made of key: value pairs
27
New cards
res.json()
Turns the Response object from fetch into usable data; returns another promise
28
New cards
Asynchronous
Code that takes time to finish and doesn't block the rest of the app
29
New cards
Promise
An object representing the future result of an async task: pending, fulfilled, or rejected
30
New cards
.then()
Runs when a promise succeeds; receives its result
31
New cards
.catch()
Runs when any promise in the chain fails; handles the error
32
New cards
Promise chaining
Linking .then() calls so async steps run in order, each getting the previous result, with one .catch() at the end
33
New cards
Data binding
Connecting data (state or props) to the UI so the screen always reflects the current data
34
New cards
One way data binding
Data flows down from state and props to the UI; this is how React works
35
New cards
Controlled component
An input whose value comes from state and updates through a setter, like <TextInput value={text} onChangeText={setText} />
36
New cards
Destructuring
Pulling values out of an array or object into variables, like const [a, setA] = useState()