In v3.x, we can use map.on("extent-change", function(){}); But in v4.x, it seems the event "extent-change" no longer exist. I tried to use:
view.watch('extent', function(newextent, oldextent) {
console.log(newextent);
});
But when I zoom once, the above console.log line executed 10 times. I don't want to execute a function 10 times when only pan/zoom once. Any idea how to do "extent-change" in v4.x?