Add a way to reload only the content page

We primarily work on Singe Page Applications. So updates are usually only on content pages, and not the layout page. But in order to view the changes, we have to reload the page on browser, requiring layout page to reload as well - calling all SCs on layout page again.

This FR is same as what was being asked for here: Reload only content page and not the whole layout page

I don't know how difficult configuring hot-reloading is - which other stacks use - but if we can have some way to just reload the content page on browser, it would be great.

My suggestion would be to call a function in the dev console to trigger content page reload. Other ideas are welcome.

Added a load and reload method to the view component.

dmxRouting.zip (10.0 KB)

Using an expression:

content.reload()

From console or JavaScript:

document.querySelector('dmx-view').dmxComponent.reload();
1 Like

Was able to reload using expression..

dmx.parse("content.reload()")

Tried this for JS, but it throws "reload is not a function" error.

document.querySelector("#content").dmxComponent.reload();

Ah sorry, the method was not accessible directly.

Have a small update: dmxRouting.zip (10.0 KB)

The JavaScript method is:

document.querySelector("#content").dmxComponent._reload();
4 Likes

Added to Wappler 7 Beta 18