React-Props-and-Expressions Flashcards

1
Q

What are props in React?

A

props are a type of object where the value of attributes of a tag is stored. you can also pass any JavaScript value through them, including objects, arrays, and functions.

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

How do you use props in a component?

A

You can pass them to child components, specify default values

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

How do you pass props to a component?

A

you can pass props by listing them in your components parameters so that you can then use them later inside your component body

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

How do you write JavaScript expressions in JSX?

A

By wrapping the expression inside curly braces

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