Please enable JavaScript.
Coggle requires JavaScript to display documents.
React.js - Coggle Diagram
React.js
Fundamentals
Components
independent, reusable parts that can be processed separately.
-
-
-
-
-
-
State
-
-
-
whenever it changes, the component re-renders.
-
Render
-
-
returns the HTML, which is to be displayed in the component
-
-
-
-
-
Redux
-
-
Fundamentals
Action
-
-
only tell what to do, but they don’t tell how to do
-
have a type field that tells what kind of action to perform and all other fields contain information or data
Reducer
just pure functions that take the previous state and an action as parameters, and return the next state
-
-
-
-
-
-
Before storing a variable in the state, ask yourself: “Can I somehow derive this variable based on other data I’m already storing?"
-
-
What is it?
can be used together with React, or with any other view library
-
-
-
-
-
Hook
-
useEffect
-
equivalent to componentDidMount(), componentDidUpdate(), and componentWillUnmount() lifecycle methods
-
-
-
useState
-
When state changes, the component responds by re-rendering
-
-
-
-
-
-
-
-
-
Virtual DOM
-
When the state of an object changes, virtual DOM changes only that object in the real DOM, rather than updating all the objects.
-
-