stereobooster / react-snap

👻 Zero-configuration framework-agnostic static prerendering for SPAs
MIT License
5.05k stars 394 forks source link

react-snap , react-helmet #507

Open sawik-code opened 3 years ago

sawik-code commented 3 years ago

I use reac-helmet to dynamicly create meta tags content from my express routes. Atfer build I get undefined in my tags. I think react-snap might hit wrong api path. How can i fix this problem? After deploy in devtools i can see my content but in html files i don't

trungnguyen128 commented 3 years ago

Same issue ^^

cseas commented 3 years ago

It looks like this library is not maintained anymore. Does anyone know of better alternatives?

joshbedo commented 3 years ago

Just checked my build and it looks like its adding react-snap meta tags and then react-helmet tags but since react-snap is first it overrides the react-helmet tags. Anyone find a fix for this?

sawik-code commented 3 years ago

Actally it work. u need to start your server first so it can get data from database, set up env for production. The bad think is you need to first build then deploy, so if user/admin change some data u need to "snap" it again and then deploy. If someone figure out how to run this script on server while application is live depends on data changed could be awesome. I found setting up prerendering on server side work on the go if crawlers hit specific route. Now i try to create dynamic sitemap.

ml242 commented 3 years ago

same problem as @joshbedo here.

does anyone know a solution?

ETA: https://stackoverflow.com/questions/61204883/using-react-helmet-results-into-2-sets-of-meta-tags-on-react-csr-page