reactjsnext.jsreact-toastify

ReactToastify position not working in React


toastify/dist/ReactToastify.css` and I can't manage the Toast to show in the bottom right. I'm using the exact code as the documentation. But it's not working

import { ToastContainer, toast } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css'; 
toast.configure();

function myComponent () {
   
   ...
   const submit = () => {
       toast.success('Your Message was sent to Wasfa Team', { poistion: toast.POSITION.BOTTOM_RIGHT });
   }
   ...
   return (
     ...
     <ToastContainer />
   )
}

Solution

  • You have to define the position as a prop on ToastContainer

    <ToastContainer position="bottom-right" />