Skip to content

Commit

Permalink
add comment back
Browse files Browse the repository at this point in the history
  • Loading branch information
EskiMojo14 committed Jun 4, 2024
1 parent 6dc9363 commit 92aa3b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/usage/UsageWithTypescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,10 @@ const booksAdapter = createEntityAdapter<Book>({

const booksSlice = createSlice({
name: 'books',
// highlight-start
// The type of the state is inferred here
initialState: booksAdapter.getInitialState(),
// highlight-end
reducers: {
bookAdded: booksAdapter.addOne,
booksReceived(state, action: PayloadAction<{ books: Book[] }>) {
Expand All @@ -679,7 +682,10 @@ const booksAdapter = createEntityAdapter({

const booksSlice = createSlice({
name: 'books',
// highlight-start
// The type of the state is inferred here
initialState: booksAdapter.getInitialState(),
// highlight-end
reducers: {
bookAdded: booksAdapter.addOne,
booksReceived(state, action: PayloadAction<{ books: Book[] }>) {
Expand Down

0 comments on commit 92aa3b9

Please sign in to comment.