NextJs preloader.
Unanswered
Shikoku posted this in #help-forum
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
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.
use this with loading.tsx at the very top level of your application
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)})
Window.addEventListner("load",()=>{setIsLoading(false)})
Asian black bear
Please don't open duplicate threads for the same issue/question.