Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

Toastify toast.error not working in async function during login attempt

I'm using React with Redux and Toastify to display notifications in my app. When the user attempts to log in, I want to show a success toast if the login is successful, and an error toast if it fails. ...
Emperor's user avatar
  • 11
0 votes
0 answers
113 views

Vite app deploying problem with react-toastify

When I am deploying my Vite app. It shows the problem error during build: [vite]: Rollup failed to resolve import "react-toastify/dist/ReactToastify.css" from "/opt/render/project/src/...
debugger8's user avatar
0 votes
0 answers
31 views

React Tostify toast appearing twice

I have a React application with this code after a saving action: import {toast} from 'react-toastify'; ... export const MyComponent = () => { ... const updateData = async (data) => { toast('...
Chen Peleg's user avatar
  • 1,936
0 votes
1 answer
166 views

How to use React-toastify in multiple components

I have a main project, let's say projectA which import couple of other react components for example a module federated react components projectB. In the projectA I have installed and imported the ...
ninja's user avatar
  • 365
0 votes
0 answers
27 views

contact form using nextjs emailjs react-hook-form and react-toastify

I am trying to build a contact form, but it isn't working, the validation is fine but the emailjs implementation is not working the input doesn't show the data the console got some errors but nothing ...
jm1004's user avatar
  • 15
0 votes
0 answers
31 views

React-tostify is not working after installing react-tostify package why

Why react-tostify package is not installing correctly and is not working ? npm install --save react-toastify import React from 'react'; import { ToastContainer, toast } from 'react-toastify'; import '...
Mian Khalil Ullah's user avatar
0 votes
0 answers
52 views

React toastify dynamic notification type issue

I want to remove TS error . toast[type](message); // error typescript I want to make toast notification type dynamic. but it is throwing error typescript Element implicitly has an 'any' type ...
JustMyThoughts -'s user avatar
0 votes
0 answers
25 views

The url in my react application is updating but the component is not loading

I am building a web application using react as frontend and firebase for backend. in the login page, after user hit the login button the toastify message displays "login successful", I want ...
Kiran Rai's user avatar
0 votes
1 answer
877 views

How to customize React Toastify progress bar using tailwindcss?

I am trying to customize the original React-Toastify component using the following code: const bgColor = 'bg-[#F6F4E8]'; const color = 'text-[#1D3124]'; const progressBarBgColor = '#07bc0c'; ...
Aron's user avatar
  • 1,272
0 votes
2 answers
108 views

Why the toast.success is not working here?

I want to show a toast using react-toastify package after succesfully deleting the data object. But the toast function is not working properly here. import { ToastContainer, toast } from "react-...
Mir Kamrul Ahsan Asif's user avatar
1 vote
0 answers
47 views

react-toastify "Cannot destructure property 'position' of 'u.props' as it is undefined"

I'm super struggling with react-toastify and an error I'm getting randomly, after browning different pages in my application it just fails suddenly and crashes whole app. The error I'm getting: "...
underfrankenwood's user avatar
0 votes
1 answer
166 views

Showing multiple messages in one toast in React

I want to show 3 messages in One single toast. Once the toast is launched , in the same toast show next set of messages. Infact i want to do concatenation of messages. How do i do this in React
nanda yelgar's user avatar
0 votes
1 answer
499 views

common util for toaster message from React-toastify

I am using React-toastify library, I am creating a common method in 'Util' file where we want to call just method with 'title' and 'description' so that 'toaster' notification message will be ...
Prasad Patel's user avatar
1 vote
1 answer
577 views

Testing react-toastify with Jest & React Testing Library

So I have a simple component with a button that opens a modal which is a react-toast. The modal get closed when a user clicks on the Close button(X) which is inbuilt in react-toastify. Now I want to ...
random_coder's user avatar
1 vote
1 answer
436 views

React Toastify not rendering

I want to add react toastify to my react vite application and I am encountering error related to useSyncExternalStore. I have tried to use version 9 of react toastify but the issue still display in ...
APY's user avatar
  • 11
0 votes
3 answers
2k views

why react toastify doesn't work in my project?

I am trying to use react toastify in this function inside my signup page const submitionHandler = ()=>{ let userData = {name,email,password,phone,country,gender}; //validate data //...
Hadal Magdy's user avatar
0 votes
0 answers
371 views

Failed to compile in a next.js project

./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[2].oneOf[7].use[1]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[...
Nasim Helal's user avatar
0 votes
1 answer
118 views

there is another toastify when I close the fitst

Hi I'm using react toastify in my next project . here's the image I wish the image could show what I mean . I'm closing the first toast , but in the image you can see that there is another toast ...
Arsi-gh's user avatar
0 votes
2 answers
452 views

react shows toast multiple times

Currently i have started learning in React to call API but when component is rendered on browser side from below code toast message is shown two times instead of single time. Can someone please help ...
Ravi Dobariya's user avatar
0 votes
0 answers
276 views

(react-toastify/dist/ReactToastify.css) error in react js

I am trying to add toast message in react js I install package using this (npm add react-toastify) but when I use this (import 'react-toastify/dist/ReactToastify.css';) this is giving error see error ...
M Junaid's user avatar
  • 835
-1 votes
1 answer
242 views

React-notify, toast show as normal text on top-left corner of website

I use react-toast, laravel, react and inertia. While i want run toast(message); toast show as text on top-left corner in broweser window I try use standard layouts and basic toast codes. I tryied ...
Dero MrFoxy's user avatar
1 vote
1 answer
5k views

React-toastify: Specify custom width for .Toastify__toast-container--top-center

In React-Toastify, if I do toast(<Alert id="alert" type="error" heading="Error" headingLevel='h1' children={msg} />, { className: "toastError" }); ...
gene b.'s user avatar
  • 11.9k
4 votes
5 answers
4k views

ReactToastify.css.map not found (Next 13 /app folder)

When trying to import the css from the React-tostify lib import 'react-toastify/dist/ReactToastify.css' I get the following error: Failed to load resource: the server responded with a status of 404 (...
Lucas016's user avatar
  • 107
0 votes
1 answer
908 views

React toastify text and close button is not aligned to the toast container

React toastify text and close button is not aligned to the toast container This is the toast container in app.js and there is no <ToastContainer position="bottom-center&...
Kunal Kalwar's user avatar
0 votes
0 answers
33 views

Cannot access microphone when open link website from facebook

https://i.sstatic.net/cpSK7.png const mediaDevices = navigator.mediaDevices || (navigator as any).webkitMediaDevices || (navigator as any).mozMediaDevices || (navigator as any).msMediaDevices; if (...
Eng Ger's user avatar
3 votes
1 answer
327 views

How can i use React toastify (Promise) toast, with email js

I am currently using success and error toast with email js but i want to use toastify promise with my custom loader here is my current code import emailjs from "@emailjs/browser"; import { ...
Azeem Khan's user avatar
0 votes
0 answers
1k views

React-toastify does not slide down smoothly off the screen

I am able to render the react-toastify. However, the problem I am facing is that the toasts do not slide down the screen completely smoothly. I am using cssTransition for animation. The toast folds ...
JustAG33K's user avatar
  • 1,548
2 votes
0 answers
150 views

react-toastify toasts from an external npm library not rendering

I have a basic react app where I installed my own npm general library that contains general components (Buttons, Grids etc.) and a file with API calls that launch toasts upon certain returned statuses ...
Claim's user avatar
  • 901
0 votes
0 answers
84 views

Toast message with wrong mark always positive

getting correct mark with correct message i want crros mark for the following code i am getting same(positive sign in toast message with coreect message why so plx check it once.. const navigate=...
Himanshu Prem's user avatar
0 votes
3 answers
5k views

React-Toastify Styling Issue in TypeScript - Unable to Set z-index for Toast Container

I am currently developing a React application using TypeScript and have integrated the React-Toastify library for displaying notifications. However, I am facing some styling issues with the ...
jC61's user avatar
  • 165
1 vote
1 answer
786 views

React-Toastify not rendering

I am currently using React-Toastify version 7.0.3 and have upgraded to 9.0.3. But with the updated version I am unable to render any notifcations as all. Steps I did: yarn add [email protected] ...
jakeMantle's user avatar
1 vote
1 answer
1k views

RTK fetch query error is display toast multiple time

I am fetching data using RTK Query but when errors occur I create a toast using react-toastify library that shows a toast message multiple times how to prevent this? when I consol log I see that part ...
Het Patel's user avatar
  • 109
0 votes
1 answer
2k views

ho to enable react-toastify in nextjs react-hook-form component?

in my next js component i am using the react-hook-form. when i am submitting the form i wish to toast the user a success\error msg. no matter what i do, i can not make the toast work. my code: ...
helpper's user avatar
  • 2,536
0 votes
2 answers
841 views

Why does React-hook-form error message runs twice?

I am validating fields with react-hook-form and besides having fields as required, I also run the toast to show user that field is required. I use the following function to achieve it: const runError =...
NikaA3's user avatar
  • 29
1 vote
1 answer
396 views

How to give two messages to a single toast using react-toastify

I wanted to display a toast message when user clicked on favorite button, the message should be either Added to Fav or removed From Fav, but I want only a single toast to do it. Is it possible? If yes ...
Ujjawal Mathur's user avatar
0 votes
2 answers
6k views

how can i dismiss a particular toast from within the toast itself in react-toastify

I want to create a toast with two buttons "accept" and "reject". when I click reject I want to dismiss the only toast which contains these two buttons. i simply want the toast to ...
LakshaySingh's user avatar
1 vote
1 answer
127 views

How can "toast" (react-toastify) be initialized without launch it?

I need your help. I want to initialized a Toast instance with React.userRef, but without launch it, because I want to use that Ref Id to update any Toast type, and I don't know which Toast type (info, ...
Raul's user avatar
  • 483
0 votes
1 answer
76 views

React Toastify Alert not displaying

I want a popup alert when the user interacts with a radio button. I have the relevant code below. When I select a radio button, I do get the console message but no pop-up. What am I doing wrong here? ...
Bayley Sapara's user avatar
2 votes
3 answers
7k views

React-Toastify is not displaying properly

I am using React Toastify in my React.js file where i want to display a toast message that user successfully added. Therefore I used API to send the data to add in my database using Spring Boot which ...
Mustafa_Dahodwala 19_13's user avatar
0 votes
1 answer
540 views

react toastify does not show rejected promise error

I have an NFT contract and want to call buyNft // since contract is passed from outer scope, I need to create a new constant as an inner obj const _contract = contract; const buyNft = ...
Yilmaz's user avatar
  • 48.7k
0 votes
2 answers
1k views

how to customize react-toastify

I need to customize react-toastify. I tried to follow the advice from the documentation and change the styles in the .scss file. unfortunately this didn't work. tell me what am I doing wrong? I want ...
reduce10's user avatar
0 votes
2 answers
4k views

Show a react-toastify toast after navigating to another page

I have this function that submits data to an API call function on submit and then with the successdata it shows a toast. As the next step I made it to navigate to another page and to show the toast. ...
Sunera Wickramasinghe's user avatar
0 votes
0 answers
300 views

Why does this happen when I try to install react-toastify

How do I fix this. the toast functionality doesn't work. I was trying to install react-toastify
rayst4rk's user avatar
3 votes
2 answers
760 views

How to use react-toastify outside component and use react component as body of it

I have a file called agent.ts that contains axios interceptors. In those interceptors I watch for any status code that is >= 400 and <= 500. When such error occurs, I am invoking react-toastify ...
Dobromir Ivanov's user avatar
1 vote
0 answers
430 views

How can I style a toastify toast in the same js file, without using the styled toastcontainer?

in my app I use the ToastContainer component to display more than one type of toast. I do not want them both to have the same style, therefore I cannot use a styled ToastContainer to achieve what I ...
FishyK's user avatar
  • 169
0 votes
2 answers
4k views

How can I set up my toastify so it only shows up once on the time I specified?

so I am trying to get my toastify to only show up once five minutes before the time I have specified. I tried using the useEffect hook, but the toast still shows up every minute or so. The output I ...
FishyK's user avatar
  • 169
1 vote
0 answers
510 views

How can I add a Mui Icon to my toast without it throwing an error/not aligning with the text?

I tried including a Info Icon from mui in md toast, but it didn't work. This is what I tried: import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined"; toast("Information Toast&...
FishyK's user avatar
  • 169
0 votes
1 answer
516 views

How to render multiple toasts using map loop in react

I am trying to render multiple toasts using .map loop. But it is only the toast with the last element from the loop. var errorCount = { error1: 50, error2: 101, error3: 70, error4: 105 }; Object....
Dev's user avatar
  • 3
0 votes
2 answers
113 views

A global reactJS Function to be called in all components and containers

I have setup a ToastContainer in my main App.js return ( <div className='wrapper' style={{height: '100%'}}> <ToastContainer limit={1} containerId={'error'} ...
Akash Mehta's user avatar
0 votes
1 answer
1k views

react-toastify toasts from array objects

how can I display toasts by traversing an array of objects, each of these objects with a unique id and names. I need to display a toast for each object inside this array, with a text and the value {...
CodeAgainst's user avatar