Question: Is it ok for one slice to import another slice? #4727
ChristophP
started this conversation in
General
Replies: 1 comment
-
Yes, it should be legal at both the types level and runtime level to do circular imports between slices. It's certainly possible to end up with either type or runtime errors depending on how the codebase is organized. I don't have concrete examples right this second. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am having circular dependency problems in my root reducer which TypeScript complains about. It reads like
from a very simplified version of this code.
My root suspect is that in the codebase some slices import others in order to build selectors that aggregate data from different slices.
So my question is ...
... is it even ok to use selectors of one slice in another slice? If not, what is the best way to structure selectors that compose values from multiple slices?
Things I already tried
Circular definition of import alias
but I couldn't find any description of what exactly causes this errorBeta Was this translation helpful? Give feedback.
All reactions