React-snap: Only pre renders home or landing page but not other routes?

Created on 29 Jun 2020  路  5Comments  路  Source: stereobooster/react-snap

Bug Report

Current Behavior
It Only pre renders home/main or landing page not other routes. I am using react-router-dom.

Reproducible demo
https://priceless-curran-c32657.netlify.app/about
I have deployed to netlify. you can try on this on /about page. If you click view page source and search for "This is about". It is not found.

However it works on home page, you can click view page source and search for text "Give it a title" or "Write your story" it is found.

This issue was also asked on stack overflow.

Most helpful comment

Actually react-snap scan links like this <Link to="/about/">about</Link>, not the declared routes, add links that match a route for other pages and test.

All 5 comments

Actually react-snap scan links like this <Link to="/about/">about</Link>, not the declared routes, add links that match a route for other pages and test.

@mohcinenazrhan sorry I didn't understand..
I have two page in my app. One is pre-rendered, other is not. I want to know why its happening and the possible solution.
It's just a simple react app using react-router-dom?
Is there something special needs to be done??
I have no idea what you are talking about declared routes, add links that match a route for other pages??

@kaloraat does your app have a link component like this <Link to="/page/">page</Link> for the page that is not pre-rendered?

Has anyone found solution for this problem?
I am having exactly same problem and its only prerender home page not other routes.

Like @mohcinenazrhan said react-snap only crawls pages it finds with <Link to="/about">About</Link>. If you don't have a link it won't crawl the page.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wInevitable picture wInevitable  路  8Comments

goras picture goras  路  5Comments

behnammodi picture behnammodi  路  9Comments

alan345 picture alan345  路  3Comments

stereobooster picture stereobooster  路  6Comments