I'm not sure I understand how render() method works exactly and how to add & render dynamic content to widget's HTML/template...
1) First of all - for some reason each click on the map I loaded - triggers the render() method about 7 times. Any idea why? what's the lifecycle of this method? (I've attached a GIF showing that each click on map is calling the redner() method 7 times).
2) Regarding adding dynamic HTML - let's say that I have an initial HTML I render thru render() method, and I want to add additional "h1" html element on a button click. What is the right way to do it? I just want to append HTML elements to the initial render.
In javascript API version 3 - we would just access the DOM using dojo and add whatever we want. How is it done in this latest version 4?
Thanks.