react-toastify icon indicating copy to clipboard operation
react-toastify copied to clipboard

how i can use this with next js 14

Open enggsatyamraj opened this issue 1 year ago • 3 comments

i have to import { ToastContainer, toast } from 'react-toastify';

in every page, can anyone tell me, how to get rid of this

enggsatyamraj avatar Feb 18 '24 17:02 enggsatyamraj

add the <ToastContainer ... /> in the root layout of you app

slackerzz avatar Feb 19 '24 15:02 slackerzz

But there is not root directory in it I guess. Will adding this in page.js of app folder work ????

enggsatyamraj avatar Feb 19 '24 15:02 enggsatyamraj

take a look here: https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts#root-layout-required

slackerzz avatar Feb 19 '24 15:02 slackerzz