hi, i am adding next lines:
import { Toast } from 'primereact/toast';
<Toast ref={toast} />
and
toast.current.show({severity: 'success', summary: 'Success Message', detail: 'Order submitted'});
in a function that i want show the toast but i am getting this error: 'toast' is not defined'
am i forgetting something? thank you so much for your reply
error using toast
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi,
You need to create a ref. Exp; const toast = useRef(null);
Best Regards,
You need to create a ref. Exp; const toast = useRef(null);
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 17 guests