Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

fundera/fundera-redux-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Fundera Redux Snippets

Usage

  • create action ('rfact')
export const $1 = "$1";
function $2($3) {
	return { type: $1, $3 };
}
  • create async action ('rfaact')
export function $1() {
	return function (dispatch) {
	    ApiUtil.$2()
        .then( (res) => {
	        dispatch($3(res);
         });
    };
}
  • reducer ('rfred')
function $1 ( state = [], action ) {
	switch(action.type) {

    default:
	    return state;
    }
}
  • reducer action ('rfredact')
 case types.$1:
	 return ;
  • dispatch action ('rfdact')
 on$1={ $2 => dispatch(actions.$3.$1($2)}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published