A module is a mechanism for encapsulating and publicly exposing (exporting) functionality within our app.
A module therefore has two purposes:
- To export a public API upon which other parts of the application can rely
- To encapsulate the private implementation behind the public API
Exported functionality is deemed safe to import by any other part of the application.