A Pen by AmiraAmin

PHOTO EMBED

Sun Jun 13 2021 10:54:47 GMT+0000 (UTC)

Saved by @amiraamin #undefined

console.clear();

//people droppig a forn (action creator)

const creatPolicy =(name,amount)=>{

  return{//action(form in our analogy)

    type:'CREATE_Policy',

    payload:{

      name,amount

    }  

  }  

}

​

const deletePolicy =(name,amount)=>{

  return{//action(form in our analogy)

    type:'DELETE_Policy',

    payload:{

      name,amount

    }  

  }  

}

​

const creatClaim =(name,amountOfMoneytoCollect)=>{

  return{//action(form in our analogy)

    type:'CREATE_CLAIM',

    payload:{

      name,amount

    }  

  }  

}
content_copyCOPY

https://codepen.io/amiraamin12/pen/Popxqep?editors