aboutsummaryrefslogtreecommitdiff
path: root/src/features/counter/Counter.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/features/counter/Counter.jsx')
-rw-r--r--src/features/counter/Counter.jsx30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/features/counter/Counter.jsx b/src/features/counter/Counter.jsx
deleted file mode 100644
index b8453b2..0000000
--- a/src/features/counter/Counter.jsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import React from 'react'
-import { useSelector, useDispatch } from 'react-redux'
-import { decrement, increment } from './counterSlice'
-
-export function Counter() {
- const count = useSelector((state) => state.counter.value)
- const dispatch = useDispatch()
-
- return (
- <div>
- <h1>{count}</h1>
- <div>
- <button
- aria-label="Increment value"
- onClick={() => dispatch(increment())}
- className='btn btn-outline-primary'
- >
- Increment
- </button>
- <button
- aria-label="Decrement value"
- onClick={() => dispatch(decrement())}
- className='btn btn-outline-primary'
- >
- Decrement
- </button>
- </div>
- </div>
- )
-}