Reactでの一時的な通知メッセージ(Toast)関数呼び出し版
https://note.affi-sapo-sv.com/react-toast.php
ReactベースのToastを関数呼び出し経由で表示する
コンポーネントの設置
import Toast from "./toast/toast.jsx";
createRoot(document.getElementById('root')).render(
<>
<App>
<Toast />
</>
);
※制限:Toastは一つのみ考慮
Toastの表示
import { showToast } from "./toast/toast";
showToast( "メッセージ" );
npm install
npm run dev
npm run build
名前: kchan
GitHub: https://github.com/kchan-p/
Website: https://note.affi-sapo-sv.com/
MIT License