react-usemessage-hook
v1.0.6
Published
A hook for activing message bar functionally
Downloads
9
Readme
A hook for activating message bar programmatically, based on Material-ui
Install
npm install react-usemessage-hook
Usage
import React, { useEffect } from "react";
function App() {
const msg = useMessage();
useEffect(() => {
msg({
type: "success", // success | warning | error | info
msg: "Hello World",
duration: "6000" // ms
});
}, []);
return <></>;
}