Value in props is not updating on hot reload.
Hi,
I have integrated AEM with Next.js application and want to use one of the feature of next js - swr (stale while revalidate).
It updates the data on the browser whenever there is an update in the data of the API.
The issue here is, I am getting the updated data printed in the browser console hence swr is working fine, but the DOM is not reflecting the updated data in the mapped component.
On debugging, I found that swr is getting the updated data but the updated props are not sent to the editable components.
As per the documentation, MapTo sends the props to the mapped components.
So my question is, does MapTo maps the component with its props only once when the page reloads?
Is there a way in which MapTo can be invoked again to pass the updated props without reloading the page manually? - (for the updated props to be displayed on the browser).
Any help will be appreciated!
Thanks