reduxjs / rtk-github-issues-example

Source code for the Redux Toolkit Advanced Tutorial
214 stars 97 forks source link

Cycle dependency #14

Closed jvaclavik closed 4 years ago

jvaclavik commented 4 years ago

There is a cycle dependency in the repository:

src/features/issuesList/issuesSlice.ts
src/app/store.ts
src/app/rootReducer.ts
src/features/issuesList/issuesSlice.ts
markerikson commented 4 years ago

Type-only cycles are fine - the TS compiler can handle those okay. Thus, we can import a slice reducer into rootReducer, import RootState into Store, and import both RootState and AppThunk back into a slice.