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
It's fairly common to have selectors that use other selectors. This is still possible with slice selectors, but defining a selector without a return type can cause a circular type inference problem:
359
+
360
+
```ts no-transpile
361
+
const counterSlice = createSlice({
362
+
name: 'counter',
363
+
initialState: { value: 0 },
364
+
reducers: {},
365
+
selectors: {
366
+
selectValue: (state) => state.value,
367
+
// highlight-start
368
+
// this creates a cycle, because it's inferring a type from the object we're creating here
0 commit comments