Core nue concepts

Universal hot-reloading

Nue provides a powerful hot-reloading utility that automatically updates your page on the browser as you edit your content, styling, layout, data files, or reactive components.

Hot-reloading is automatically enabled in development. The client-server communication is based on server-sent events. Instead of making a full reload, Nue uses a technique called DOM diffing to only update the parts on the page that have changed. Here are the details of what gets automatically updated:

Content updates

Styling updates

Reactive components

Hot-reloading a reactive component

Single-page apps

Compiler errors

JS error

Layout error

Non-goals

Nue hot-reloading applies to UI components only so updates to JavaScript/TypeScript extensions have no impact. These extensions are best developed and tested on the server side.

Disable hot-reloading

You can disable hot-reloading with the hotreload: false configuration option. Hot-reloading is automatically disabled for the production build, as it makes no sense there.