Next.js Discord

Discord Forum

NextJs preloader.

Unanswered
Shikoku posted this in #help-forum
Open in Discord
Avatar
ShikokuOP
What is the best approach to create a preloader in a website which hides when all the content of the website is loaded in nextJs app router?

6 Replies

Avatar
ShikokuOP
No, I want to create animations with framer motion when all the content of the website is loaded then hide the loader. The website will be static.
Avatar
ShikokuOP
Actually I have some animations I want that should wait until animation finishes. Does this work in useEffect in template.tsx
Window.addEventListner("load",()=>{setIsLoading(false)})
Avatar
Asian black bear
Please don't open duplicate threads for the same issue/question.