File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -652,7 +652,10 @@ const booksAdapter = createEntityAdapter<Book>({
652652
653653const booksSlice = createSlice ({
654654 name: ' books' ,
655+ // highlight-start
656+ // The type of the state is inferred here
655657 initialState: booksAdapter .getInitialState (),
658+ // highlight-end
656659 reducers: {
657660 bookAdded: booksAdapter .addOne ,
658661 booksReceived(state , action : PayloadAction <{ books: Book [] }>) {
@@ -679,7 +682,10 @@ const booksAdapter = createEntityAdapter({
679682
680683const booksSlice = createSlice ({
681684 name: ' books' ,
685+ // highlight-start
686+ // The type of the state is inferred here
682687 initialState: booksAdapter .getInitialState (),
688+ // highlight-end
683689 reducers: {
684690 bookAdded: booksAdapter .addOne ,
685691 booksReceived(state , action : PayloadAction <{ books: Book [] }>) {
You can’t perform that action at this time.
0 commit comments