How to make a React.js-based page within Discourse that only re-uses its header and session?

I just looked at what HTML is returned per topic when it’s accessed directly by opening its URL. So, all the HTML gets populated straight away:

  • Header
  • Title
  • Breadcrumb
  • Posts
  • Footer

This means the template has been processed on the server.

Is there a way to subscribe to an event when a new topic is opened in Discourse, including both navigation and opening by direct URL?


Now, if I make a separate page: https://meta.discourse.org/my-page.html

Will it be possible to load the Discourse’s header section into that page and still have access to all the Discourse environment and streaming API from withing JS?