React Flashcards

1
Q

Functional component

A

Functional components are pure functions that do not hold internal state. They accept props as input and return JSX (representing a piece of UI)

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

React hooks

A

Let you maintain state and side effects in functional components

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

Class component

A

Unlike functional components, allow you to use stateful logic and lifecycle methods (for side effects). With hooks, no longer require class components if you want to use state and side effects now.

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

Side effects

A

TBD

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

State

A

TBD

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

Props

A

A way of passing attributes to a React component

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

Constructor function

A

TBD

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

What is an Expression?

A

Anything that evaluates to a value. Eg 1 + 1. An expression is often the thing to the right of ‘=’

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

JSX

A

JSX is syntactic sugar for the ‘React.createElement()’ function call. React.createElement(Element, { attributes, eg. props })

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