Skip to content
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

Do not mutate things... #1313

Open
TheBit opened this issue Nov 7, 2023 · 1 comment
Open

Do not mutate things... #1313

TheBit opened this issue Nov 7, 2023 · 1 comment

Comments

@TheBit
Copy link

TheBit commented Nov 7, 2023

Describe the bug
It is almost impossible to use this library in a Jamstack (Next.js + Headless CMS) where things such as dangerouslySetAllPagesToNoIndex are in a customer's control. For example, they start from default dangerouslySetAllPagesToNoIndex: false, then change it to true, then decide to turn it off again - but they cannot (until we rebuild and redeploy Next.js).

Reproduction
https://github.com/TheBit/do-not-mutate-things - I described the steps in the readme. It utilizes getServerSideProps just for the sake of simplicity, but we are actually suffering in production which is based on getStaticProps + Strapi + on-demand revalidation (and we reproduced it locally using next dev).

Expected behavior
An obvious thing should happen - it should be possible to change any props passed to next-seo in a running Next.js app without resorting to redeploying new builds.

Additional context
Do not mutate stuff :(
https://github.com/garmeeh/next-seo/blob/master/src/meta/buildTags.tsx#L164

@maxmaster82
Copy link

Any updates?:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants