I’m using Sage 10 and I read that the old way of JS separation by page was gone and it was separated on a library (js-dom-router).
But on Github, I can’t find any way on how to use it. I import it, but it doesn’t work with the methods ‘init’ and ‘finalize’. What methods should I use with this library for the specific page scripts to works?
Those home.js, common.js, etc. files are ES modules that export methods/objects/variables and can be imported from inside the main script file (app.js).
The new router implementation is much more loosely coupled, you can decide yourself how to wire the components up.