toast and history.push

UI Components for React
Post Reply
Posts: 2
Joined: 28 Dec 2020, 15:36

28 Dec 2020, 16:09

I have a scenario like this: after a user is successfully registered, I want to show message with toast and also navigate to another route with history.push().
But history.push seems to mess up with toast?
Is there anything to make it work?

Code: Select all

  const history = useHistory();

  const handleRegister = (values) => {
      .then((res) => {{
          severity: "success",
          summary: "Successfully Registered",
          detail: "You are auto logged in",

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest