Michele Stieven
1 min readApr 23, 2019

--

Hi, I’m so sorry for replying after months, but I haven’t looked at Medium for a while, I hope that this comment will help you or any reader out there.

That depends, I often create Feature Modules (views) based on the routes of my app, so: anything beyond /home belongs to HomeModule, anything beyond /dashboard belongs to DashboardModule. That helps me visualizing the entire tree of the app. So, if the signin/signup page was under [domain]/signin, I would put AuthModule on the same level of HomeModule (a sibling). If there’s no /home and the signin components are always visible, I would consider them part of the HomeModule: at this point there’s no difference between option 1 and 2, it’s a matter of preferences. If you choose option 2, you should just use AuthModule as a wrapper for the components that will be exported, and have HomeModule to import (not lazy) the AuthModule.

Another thing that I do: I don’t call it AuthModule :) My actual AuthModule contains all of my Authentication logic (services), no components, and it lives inside Core.

--

--

No responses yet