geelen / react-snapshot

A zero-configuration static pre-renderer for React apps
MIT License
1.66k stars 104 forks source link

Dynamic pages not loaded with react-snapshot #111

Open kbardi opened 6 years ago

kbardi commented 6 years ago

Hi there, first of all thank you for this great framework!! I'm using it on my project, and it works great.

I'm having a problem with dynamic pages. I have a route like localhost/stories/:storyID, and I cannot add to includes attribute on reactSnapshot settings because the stories change every week. Is there any way to force to load of those routes on every deploy without hardcoding routes on includes?

Also I have an API which returns all urls my project has, so if I can set include attribute dynamically from this API, or from an external file generated automatically, it would be great.

Both options would work for my project, bug hardcoding includes on package.json is not possible for me.

Thanks in advance,

jermsam commented 6 years ago

I have the same issue. Someone come to our rescue.

NangoliJude commented 6 years ago

Can you share the code

jermsam commented 6 years ago

Find it here please: https://github.com/jermsam/meta-app

Chibuzo commented 5 years ago

Has anyone found a solution to this?

camposcristian commented 5 years ago

We ended up using react-snap , it crawls pages perfectly but there are some issues with the markup so if it's a big site, the idea will be to use something different