Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

Commit

Permalink
Clarify counter slice name
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Apr 4, 2020
1 parent b2ab762 commit e0cca21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions template/src/features/counter/counterSlice.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createSlice } from '@reduxjs/toolkit';

export const slice = createSlice({
export const counterSlice = createSlice({
name: 'counter',
initialState: {
value: 0,
Expand All @@ -22,7 +22,7 @@ export const slice = createSlice({
},
});

export const { increment, decrement, incrementByAmount } = slice.actions;
export const { increment, decrement, incrementByAmount } = counterSlice.actions;

// The function below is called a thunk and allows us to perform async logic. It
// can be dispatched like a regular action: `dispatch(incrementAsync(10))`. This
Expand All @@ -39,4 +39,4 @@ export const incrementAsync = amount => dispatch => {
// in the slice file. For example: `useSelector((state) => state.counter.value)`
export const selectCount = state => state.counter.value;

export default slice.reducer;
export default counterSlice.reducer;

0 comments on commit e0cca21

Please sign in to comment.