React Props and Expressions Flashcards

1
Q

What are props in React?

A

Props are objects that are passed into React elements.

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

How do you pass props to a component?

A

When declaring a React element, after the Component name type the prop property equal to the value you want to pass. Value should be surrounded with {}.

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

How do you write JavaScript expressions in JSX?

A

Using the curly braces {}.

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