Created
May 31, 2021 03:05
-
-
Save jinook929/73f74bf43d584b0b510d8625b9557c65 to your computer and use it in GitHub Desktop.
React with Hooks, with Redux & React-Redux: Reset.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import '../App.css' | |
import {resetCount} from '../actions' | |
import {useDispatch} from 'react-redux' | |
const Reset = () => { | |
const dispatch = useDispatch() | |
return ( | |
<div className="Reset"> | |
<button id="resetBtn" onClick={() => dispatch(resetCount())}>Reset</button> | |
</div> | |
) | |
} | |
export default Reset |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment