Sage 9 and Javascript best practices

Hey!

So I’ve been using Sage 9 for a bit, but mostly cobbled together stuff in Common.js under finalized. I realize this is not how it’s supposed to be done (to be able to maintain clean code anyway).

What should I read up on the get with the program regarding best practices? Is the idea to create modules in separate files and feed that into Common and Home.js?

Would be super nice if someone could show a simple example how they work with Sage 9 and proper JS handling.

Cheers.

It’s the same exact idea as Sage 8 with DOM-based routing. The only difference is that each route is broken into its own file with Sage 9.

Think I have it confused because of ES6 and the fact that you added the module thingie. Somebody recommended that I’d read up on module patterns, so that’s what I’m gonna do I guess.

Cheers!