nfl / react-helmet

A document head manager for React
MIT License
17.28k stars 657 forks source link

Metatags are not updating with dynamic data ( Data from API ) #633

Open ursnj opened 3 years ago

ursnj commented 3 years ago

Im trying to populate <Helmet/> with dynamic data, ( from API ) but its not working when i share page in social networks like Facebook and Twitter, i think the purpose of Metatags are not full filling with this.

If some one has any solution please put it here.

you can find the issue here in my Website : https://www.watchpartys.com/watchpartys/watch/93038ad4-dbb5-462f-aeed-efbd91b0ff45

Prema07 commented 3 years ago

I was having smilar issue . i have to add some dynamic content in script tag. So i have added the property encodeSpecialCharacters={true} & onChangeClientState={(newState, addedTags, removedTags) => console.log(newState, addedTags, removedTags)} in tag. So it worked for me. it detected my DOM changes

haresh6x commented 2 years ago

I was having smilar issue . i have to add some dynamic content in script tag. So i have added the property encodeSpecialCharacters={true} & onChangeClientState={(newState, addedTags, removedTags) => console.log(newState, addedTags, removedTags)} in tag. So it worked for me. it detected my DOM changes

Can you tell me more details on how to implement this?