-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
with-react-helmet bug in production mode #3534
Comments
I do not believe this is limited to I can absolutely reproduce this following your steps (and have). Accessing the same URL from a separate machine and even network does not reproduce the behavior though (SSR source), which I believe limits it to the very first render of a newly built deployment (and the client-side JS compensates for it, in that exact case). |
@JeromeFitz do you maybe have any workaround for this? Right now we're extracting the desired information to render the correct meta information from |
@damianfrizzi On my end, I am okay with its current behavior (wherein, I can only verify this happens on the first render from the server itself). So at this time, I have no workaround or way to suggest addressing this. |
I dug into this and found out what caused the behaviour. The default metadata was declared inside of Solution is to move the declaration of any default metadata into |
I tried to implement React Helmet for our project and noticed a bug when running in production mode.
React Helmet doesn't initialize on the very first request after starting the application. But it initializes correctly on each subsequent request (SSR & CSR).
I cloned the minimal with-react-helmet example and I can confirm that the issue appears there, too.
Expected Behavior
React Helmet should initialize correctly on the first request that was made.
Current Behavior
As described above, React Helmet doesn't initialize correctly on the very first request.
Steps to Reproduce (for bugs)
The text was updated successfully, but these errors were encountered: