aboutsummaryrefslogtreecommitdiff
path: root/src/features/counter/Counter.jsx
diff options
context:
space:
mode:
authorAdrián Oliva <adrian.oliva@cimat.mx>2023-05-17 21:26:50 -0600
committerAdrián Oliva <adrian.oliva@cimat.mx>2023-05-17 21:26:50 -0600
commit593ab2d7d4ef972594131b125d9320c618e54691 (patch)
tree1d44587b3785f987e41d807370d8a04f27565170 /src/features/counter/Counter.jsx
parent163398f68444d278eb83543ba9798a6441c8af9f (diff)
downloadToDo-App-FE-593ab2d7d4ef972594131b125d9320c618e54691.tar.gz
ToDo-App-FE-593ab2d7d4ef972594131b125d9320c618e54691.zip
Redux used to add ToDos
WE MADE IT!! I don't know how, but it is functional. :'3
Diffstat (limited to '')
-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>
- )
-}