cost 285 ms
导航到另一个页面后显示 react-toastify toast - Show a react-toastify toast after navigating to another page

我有这个 function 将数据提交给 API,在提交时调用 function,然后用成功数据显示祝酒词。 作为下一步,我导航到另一个页面并显示祝酒词。 但它只导航,不显示吐司。 const submitHandler = () => { updatePatient( data, (su ...

如何在组件外部使用 react-toastify 并将 react 组件用作其主体 - How to use react-toastify outside component and use react component as body of it

我有一个名为 agent.ts 的文件,其中包含 axios 个拦截器。 在这些拦截器中,我会观察任何 >= 400 和 <= 500 的状态代码。发生此类错误时,我将调用 react-toastify toast。 到目前为止一切都很完美。 不过,我希望能够做的是使用 html 作为消 ...

如何设置我的 toastify 以便它只在我指定的时间显示一次? - How can I set up my toastify so it only shows up once on the time I specified?

所以我试图让我的 toastify 在我指定的时间前五分钟只出现一次。 我尝试使用 useEffect 挂钩,但 toast 仍然每分钟左右出现一次。 我用来跟踪日期是否有效的输出,它确实告诉我它们确实是不同的分钟,但它仍然至少在我点击关闭第一次敬酒后再次出现。 除了 useEffect 钩子之外 ...

一个全局的 reactJS Function 在所有组件和容器中调用 - A global reactJS Function to be called in all components and containers

我在我的主 App.js 中设置了一个 ToastContainer 我也有一个 errorHandler function 我的应用程序中有大约 1000 多个组件,几乎所有组件都有一个 renderData async function 执行特定于组件的提取调用。 我想要做的是使用此错误处理程序 ...

React toastify 弹出窗口未显示 - React toastify popup not showing

我想在关闭模式后使用 react toastify 显示一个成功消息弹出窗口,但它不起作用。 也许是因为我使用 animation 在关闭模态时稍微延迟。 我可以做一些像使用超时然后运行 setIModalOpen(false) 这样的弹出消息可以在模态关闭之前显示。 模态组件 父级(尝试在父组件的 ...

React Toastify 在显示时坏了。 如何在页面顶部正确显示 react toastify? - React Toastify is broken while showing. How can I show react toastify correctly in the top of the page?

嗨,我正在尝试显示 react toastify,但显示不正确。 显示的时候坏了这是我的代码。 从“反应”导入反应; 导入 { toast, ToastContainer } from 'react-toastify'; 它是 output这是 output 如果我点击按钮,它会显示破碎的吐司并且 ...

登录后反应弹出通知,如何让它在您第一次登录时显示一次消息? - pop-up notification in react after login, How to make it so that it will on show the message one time when you first logged in?

我正在为弹出消息使用 react-toastify,所以在登录后,当我的页面被重定向到 profile.js 时,我添加了这个 useEffect,它将在挂载时运行以显示通知 但问题是每次我访问或 go 返回配置文件时弹出消息显示,我怎样才能让它只在您登录并第一次重定向到配置文件时显示? ...

如何根据主题更改吐司的背景颜色? 反应烘烤 - How to change background color of a toast depending on theme? react-toastify

我安装了 react-toastify,我的 toasts 工作正常,但我想根据主题为它们添加一些自定义样式,但我看到的所有解决方案都不适用于我的情况。 我不想让它过于复杂,我只想改变背景颜色,可能是边框,字体颜色等。 我试过 class 覆盖文档中所说的 - 它不起作用。.Toastify__t ...

如何在toast notification(toastify)中显示来自controller(BE)的消息 - How to display the message from controller (BE) in toast notification (toastify)

概括: 我正在尝试使用(react-toastify)在通知(toast)中显示来自 controller(后端)的消息。 然后,每当我尝试使用错误的电子邮件登录(点击登录按钮)时,就会出现一条消息,我们可以在 controller 文件中找到该消息(例如:'email 的用户不存在'或'请输入所有 ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM