You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having circular dependency problems in my root reducer which TypeScript complains about. It reads like
Circular definition of import alias `sliceB`
from a very simplified version of this code.
importsliceAfrom'./slice-a';importsliceBfrom'./slice-b';// this line gives a TS errorimport{combineReducers}from'@reduxjs/toolkit';constrootReducer=combineReducers({ sliceA, sliceB });
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
Googling Circular definition of import alias but I couldn't find any description of what exactly causes this error
Narrowing it down more but the codebase is quite large and I wasn't able to narrow it down a significant amount of effort
The text was updated successfully, but these errors were encountered:
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 errorThe text was updated successfully, but these errors were encountered: