#NextJs preloader.

7 messages · Page 1 of 1 (latest)

woeful stag
#

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?

deft ruinBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

vivid lantern
woeful stag
#

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.

dense junco
#

use this with loading.tsx at the very top level of your application

woeful stag
#

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)})