Answers for "what is saga effects"

0

what is saga effects

function* gen() {
 yield 1;
 yield 2;
 yield 3;
 yield 4;
}
 
let myGenerator = gen();
 
console.log(myGenerator.next()); //{value: 1, done: false}
console.log(myGenerator.next()); //{value: 2, done: false}
console.log(myGenerator.next()); //{value: 3, done: false}
console.log(myGenerator.next()); //{value: 4, done: false}
console.log(myGenerator.next()); // {value: undefined, done: true}
Posted by: Guest on March-06-2021

Browse Popular Code Answers by Language