elm how to avoid circular dependency
The simplest way to resolve a circular dependency issue involving two modules is to do the following:
1. Isolate the elements that both of the source modules (A & B) need access to.
2. Move the shared elements into a new module (C).
3. Make the source modules (A & B) depend on the new module (C).