Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let state = {
- uraian: "Halo",
- isInsert: true, // Status I
- isUpdate: false // Status U
- }
- let reduxKanan = {
- uraian: "Halo"
- }
- let reduxKiri = {
- uraian: null
- }
- const logic = () => {
- if (state.isUpdate === true) {
- if (state.uraian !== reduxKanan.uraian) {
- console.log(`WARNING!! ${state.uraian} !== ${reduxKanan.uraian}`);
- }
- } else if (state.isInsert === true) {
- console.log('WARING!! Next Logic will be Added on Real Apllication');
- }
- }
- logic();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement