reacting to input with state Flashcards

1
Q

What does declarative programming mean?

A

Describing the UI for each visual state rather than micromanaging the UI (imperative)

Declarative programming focuses on what the UI should look like rather than how to achieve that look.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the first step when developing a component?

A

Identify all its visual states

Understanding the various visual states is crucial for effective component development.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What should be determined after identifying visual states in component development?

A

Determine the human and computer triggers for state changes

This helps in understanding how the state will change based on user interactions or system events.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which hook is used to model the state in component development?

A

useState

useState is a React hook that allows functional components to manage state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What should be removed to avoid bugs and paradoxes in component development?

A

Non-essential state

Keeping the state minimal helps in reducing complexity and potential errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the final step in connecting the event handlers in component development?

A

Connect the event handlers to set state

This ensures that user interactions correctly update the component’s state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly