DEV Community

Discussion on: "Escaping" Next.js to access the browser

Collapse
 
okbrown profile image
Orlando Brown

A good use case for this is when your using 3rd party scripts. E.g. analytic scripts that require you to fire an action base on a specific event in your application. Tealium, Adobe etc.

Another one is if you are building multiple front ends that all are used within your Nextjs app or some other SSR where you will need an enclosure what contains your libs, assets etc. This can be placed on the window object where your other team/services/apps deployed in your enclosed app have access to things like React. Reducing the need for all your apps to be bundled with the same library.