3

I'm using react to develop my project and I'm trying to pre-render it with React-snap.

When I try to build my project, react snap will crawl in project and create an html from routes. But there is a problem, when i deploy the built project, it will load the main page before loading the correct page in each route.

Prashen
  • 101
  • 8
Behnam Eskandari
  • 1,011
  • 12
  • 27
  • have you found any solutions for that? please le me know because I am struggling a lot to handle server side rendering – Muhammad Owais Nov 18 '20 at 16:47
  • Yes, I used next.js for serverside rendering – Behnam Eskandari Nov 19 '20 at 18:27
  • have you integrated redux and webpack along with Next.js? because I was trying to integrate nextjs its was also creating so many issues – Muhammad Owais Nov 19 '20 at 20:08
  • This is strange. I'm using react-snap with react and I'm not getting that behavior. If you have the routes well configured, it's not expected to have that issue. If you could provide the project repo, we could be more helpful. Also, if you're looking for optimizing SEO, Astro an Next.js are great options. Next.js has now the getStaticProps, specifically for pre-render :) – Marshall Feb 24 '23 at 13:42

0 Answers0