Advertisement
Sam1D

LogicTemporary

Apr 18th, 2020
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let state = {
  2.   uraian: "Halo",
  3.   isInsert: true, // Status I
  4.   isUpdate: false // Status U
  5. }
  6.  
  7. let reduxKanan = {
  8.   uraian: "Halo"
  9. }
  10.  
  11. let reduxKiri = {
  12.   uraian: null
  13. }
  14.  
  15. const logic = () => {
  16.   if (state.isUpdate === true) {
  17.     if (state.uraian !== reduxKanan.uraian) {
  18.       console.log(`WARNING!! ${state.uraian} !== ${reduxKanan.uraian}`);
  19.     }
  20.   } else if (state.isInsert === true) {
  21.     console.log('WARING!! Next Logic will be Added on Real Apllication');
  22.   }
  23. }
  24.  
  25. logic();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement