Introduction
Next.js is an open-source, lightweight and JavaScript framework, which allows you to develop fast and user-friendly web app...
For further actions, you may consider blocking this person and/or reporting abuse
I developed two projects (almost big projects) and I realized that you can find many incompatible things in it, especially when you are using some libs like carousel slider, sometimes it doesn't work correctly, and also you need to know some important rules to use Next js, for example at the first load you don't access to the window because it's a server-side render and accessing to JS window object causes to undefined Object error.
actually, I saw that the Next Js is very fast but I prefer React JS (if SEO is not important)
Hi there... isn't it possible to ensure that the code only accesses the window after the render with use effect hook?
Or could you also mess around with a custom document file so that the library sees what it needs?
You can make your code isomorphic (work on client and server) by checking which environment you are running in.
for example:
Browser:
Node Environment:
This makes it easier to run your component on server or client (if you choose to add SSR with Next.js later).
Wow, didn't know this before... thanks a ton 🙏
...This just helped me to fix some hydration issues I was facing with some custom components.
Don't know if that's the best approach though, but for now Ill use it until I can properly resolve the issue
no problem!
What issue were you running into ?
Awesome @parsadoc 🙌✍
Thank you for this input
I fell in love with Next.js ever since I used it. It's just so awesome 😎
Very true😁
Create-React-Application required? that's not mandatory
Сongratulations 🥳! Your article hit the top posts for the week - dev.to/fruntend/top-10-posts-for-f...
Keep it up 👍
Thank you🎉
I'm beginner but I love work with Next JS thx for this article 🌺❤️
You are most welcome
I've been searching for this extensively 9n the web, and here you are, such a savior 🙌
Thanks a lot Bentil
I'm glad you like it 🎉🥰
Thank you for sharing this detailed information about Next.js! It seems like a powerful framework with many benefits for web development projects. I've actually integrated it with my 漫画raw website, and I must say, the results have been amazing.
Great writeup! I haven't had a chance to use Next.js yet. Looking forward to tackling a project soon where I'll get to try it out
Nice 👍🏻