Created
February 3, 2020 13:45
-
-
Save indreklasn/45d372b1521db7c3c059db18b6220246 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
import React, { Component } from 'react'; | |
import { ToastContainer, toast } from 'react-toastify'; | |
import 'react-toastify/dist/ReactToastify.css'; | |
// minified version is also included | |
// import 'react-toastify/dist/ReactToastify.min.css'; | |
class App extends Component { | |
notify = () => toast("Wow so easy notifications!"); | |
render(){ | |
return ( | |
<div> | |
<button onClick={this.notify}>Notify!</button> | |
<ToastContainer /> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment