React Flashcards
Functional component
Functional components are pure functions that do not hold internal state. They accept props as input and return JSX (representing a piece of UI)
React hooks
Let you maintain state and side effects in functional components
Class component
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.
Side effects
TBD
State
TBD
Props
A way of passing attributes to a React component
Constructor function
TBD
What is an Expression?
Anything that evaluates to a value. Eg 1 + 1. An expression is often the thing to the right of ‘=’
JSX
JSX is syntactic sugar for the ‘React.createElement()’ function call. React.createElement(Element, { attributes, eg. props })