-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot change meta data dynamically client side #87
Comments
When changing the title, this shouldn't have any bearing on whether meta changes or not. I need to do a quick test to double-check. |
Any luck? |
@AmrARaouf The reason this fails is because the I did some debugging and found that in your scenario, when Helmet checks
And this is a result of manipulating the state directly in your
try
With the spread operator we can make a new object with same values and then manipulate that new object to pass to Helmet. |
I cannot seem to change the meta data from the client side. When I change the "meta" state attribute, the change seems only be queued. It is only activated when I make another change to the dom, like changing the title for example.
For instance, if my state changing function looks like this:
And my "Helmet" looks like this:
When foo(bar) is called, "default" never changes to bar.
However if my function looks like this:
Then both the title and the meta tag change successfully.
The text was updated successfully, but these errors were encountered: