I don't know if there will ever be the same functions as in 3.X, but I implemented the same (at least the previous extents) using a little code.
// Add a variable somewhere before it all happens
let prevPoint = [];
// You probably already have a 'view.when' section, add the 'view.watch' to
// look for changes to the extent and store those in the prevPoint list.
view.when(function () {
// Setup listener for the extent change, then populate the previous point using its center
view.watch("extent", function (newValue, oldValue) {
let dTest = Math.abs(newValue.xmax - newValue.xmin);
let dFactor = dTest / 100; // Need to leave any small movements behind, but these depend on scale.
if (Math.abs(newValue.xmax - oldValue.xmax) > dFactor ||
Math.abs(newValue.xmin - oldValue.xmin) > dFactor ||
Math.abs(newValue.ymax - oldValue.ymax) > dFactor ||
Math.abs(newValue.ymin - oldValue.ymin) > dFactor) {
prevPoint.push(newValue);
}
if (prevPoint.length > 40) { prevPoint.shift(); //stored }
});
});
// Previous button functionality (zoom to previous)
let btnPrevExtent = dom.byId("btnPrevExtent");
on(btnPrevExtent, "click", function () {
zoomPrevious();
})
function zoomPrevious() {
if (prevPoint.length > 1) {
prevPoint.pop();
let lastEx = prevPoint[prevPoint.length - 1];
prevPoint.pop();
view.extent = lastEx;
}
}
Could probably be made more concise but you get the idea.