Toast component being called without pressing button #4953
Unanswered
vmorales-2920
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all, I need to create a component where it executes the Toast component the moment the component is called
This is my component
toast.tx
`
"use client";
import React, { useEffect } from 'react';
import { addToast, Button, ToastProvider } from "@heroui/react";
import "../../app/globals.css";
`
I've been trying to execute the toast with an useEffect but is not showing the Toast component. Does someone has try to use the Toast component like this?
Just for information, I'm using NextJS 14 and I have also added the ToastProvider in the HeroUIProvider
Thanks
Beta Was this translation helpful? Give feedback.
All reactions