In 4.25 I get this warning
[esri.core.watchUtils]
DEPRECATED - Module: esri/core/watchUtils
️ Replacement: esri/core/reactiveUtils
:gear:Version: 4.24
I have tried to use reactiveUtils but without success, the watchUtils example in
https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-actions-capture-close-event/td-p/263372
works ok.
Here is the example that works and the other that I'm not able to get to work.
//works!
watchUtils.whenTrue(view.popup,'visible', () => {
watchUtils.whenFalseOnce(view.popup,'visible', () => {
console.info('popup has been closed');
})
});
//doesn't work
reactiveUtils.whenOnce(() => view.popup.visible).then(() => {
reactiveUtils.whenOnce(() => !view.popup.visible).then(() => {
console.info('how to get here?');
})
}); A hybrid solution seems to work but I want to remove 'watchUtils' so it's not an option.
//this hybrid works
reactiveUtils.whenOnce(() => view.popup.visible).then(() => {
watchUtils.whenFalseOnce(view.popup,'visible', () => {
console.info('popup has been closed');
})
});Any suggestions how to proceed?
Thanks