lavitz10 / redux-wpx9

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redux Lecture

Common Terms

Action

An action is a plain object that represents an intention to change the state. Actions are the only way to get data into the store.

Reducer

A reducer (also called a reducing function) is a function that accepts an accumulation and a value and returns a new accumulation. They are used to reduce a collection of values down to a single value.

Store

A store is an object that holds the application's state tree.

Action creators

An action creator is, quite simply, a function that creates an action.

Dispatch Functions

a function that accepts an action it then dispatches the action to the store.

if time we'll look at

function higherOrderComponent(Component){
    const message = 'this is my message and it came from the higherOrderComponent component'
    return function(props){
        return <Component {...props} message={message} />
    }
}

About


Languages

Language:JavaScript 65.3%Language:CSS 22.4%Language:HTML 12.3%