Normally for TWA (Traditional Web Application - .aspx) pages, printing its content can be done by loading the printable into a hidden iFrame and wait for it to be fully rendered. Afterwards, the JS function to open the print dialog is triggered. This can be accomplished by using "JS onload" event, and we would call the print function in that iframe.onload.This approach doesn’t work with RWA pages, as they work with async calls and the real "render finish" of the page is not detectable by the iframe.onload event.
So instead of the iframe.onload event, we use the componentDidMount JS event approach.
This method works well if we can check if the last item that needs to be loaded on the page is known to us (e.g. a list with many items).