Created
July 27, 2021 13:37
-
-
Save kylephughes/c630e5e63a5cc5ee4fc009bbb0e41336 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
// <Notification/> | |
import { useSelector } from 'react-redux' | |
export const Notification = (props) => { | |
const notification = useSelector((state) => state.notification) | |
} | |
// <FormComponent/> | |
import { useDispatch } from 'react-redux' | |
export const FormComponent = (props) => { | |
const dispatch = useDispatch() | |
const sendNotification = () => { | |
dispatch({type: 'SET-NOTIFICATION', payload: 'Success' ) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment