Round 1:
Disussion on past project and web optimisations techniques. Questions around useEffect how it works and how it will output on a given code snippet. How react uses batching for updates.
Output question on promises, something like this
console.log(1);
setTimeout(() => {
console.log(2);
}, 10);
setTimeout(() => {
console.log(3);
}, 0);
new Promise((_, reject) => {
console.log(4);
reject(5);
console.log(6);
})
.then(() => console.log(7))
.catch(() => console.log(8))
.then(() => console.log(9))
.catch(() => console.log(10))
.then(() => console.log(11))
.then(console.log)
.finally(() => console.log(12));
console.log(13);
Write Pollyfill of useEffect
Round2: