Last active
May 7, 2021 10:07
-
-
Save oliverlin/1b24c04a5d1735366f9821978cef3c6b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// pages/jobs.js | |
import Jobs from '../components/Jobs' | |
export default Jobs | |
// components/Jobs.js | |
import { addJob, removeJob } from '../data/jobs' | |
const Jobs = () => { | |
return <></> | |
} | |
const mapStateToProps = (state) => { | |
return { | |
jobs: state.jobs, | |
} | |
} | |
const mapDispatchToProps = (dispatch) => ({ | |
addJob: (payload) => dispatch(addJob(payload)), | |
removeJob: (payload) => dispatch(removeJob(payload)) | |
}) | |
export default connect(mapStateToProps, mapDispatchToProps)(Jobs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment