Installation
TIP
View it with a PC, the effect is even better
Requirements
vue
version >=3.2.0
Installation
bash
npm install --save vue3-toastify
bash
yarn add vue3-toastify
Global config
see: demo --> main.js
demo
WARNING
Don't forget to import styles
For Jsx
jsx
import { toast } from 'vue3-toastify';
import { defineComponent } from 'vue';
import 'vue3-toastify/dist/index.css';
const JsxDemo = defineComponent({
setup() {
const notify = () => {
toast('Wow so easy !');
};
return () => (
<div>
<button onClick={notify}>Notify !</button>
</div>
);
},
});
export default JsxDemo;