-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Right now, every app we have does things slightly differently, even when using the new app platform. I'd like to talk about whether we should aim for consistency in that regard as well and what we think works best for us.
I think what I like the best right now is having a very flat structure and use the duck approach on everything. I'll use the current state of the refactor of the sms-configuration app as an example:
I'm using views
for the routes, these are more or less just controller-like components that just compose the different modules in the src
directory into a working view as well as the view's meta data like route-path and label for sidebars, menus etc.
Everything else is a duck-module and contains components, functions and an index.js
.
From time to time there's an issue with circular dependencies when using the index.js
approach, which can be solved by importing directly what the files need and optionally split a file into multiple files when necessary (mostly happens when having two selectors.js
importing each other)