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.
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.
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.