React Fundamentals Flashcards
Why React?
Just JavaScript Unidirectional Dataflow Composition Explicit Mutations Declarative
composition
composition of components
component examples
, …
component definition
functionality wrapped into isolated container, the component;
component ~ function; ie
components manage their own state; clear boundaries for managing complexity in applications
large app built from?
small apps; components
imperative vs declarative
imperative: tell the computer how to do something
declarative: tell the computer what to do
declarative vs functional
functional: doesn’t alter state
declarative: description of what, typically doesn’t alter state
react: mostly declarative
declarative handling of requests for a component; yet state is stored somewhere, and is set + altered.
Unidirectional Data Flow
Manage state in your application. UI is going to update to that state.
UI is a
a function of state.
Explicit mutations
explicitly change state with setState
React pieces we’re to learn
Babel React Router Axios Webpack React
React Router
maps specific url to specific component
Webpack
“code bundler”; uses Bable