-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Script examples #31181
Script examples #31181
Conversation
@@ -7,6 +7,7 @@ description: Next.js helps you optimize loading third-party scripts with the bui | |||
<details> | |||
<summary><b>Examples</b></summary> | |||
<ul> | |||
<li><a href="https://github.com/vercel/next.js/tree/canary/examples/script-component">Script Component</a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like your idea of putting together all the different strategies into a single example! I may do the same and consolidate all the other examples into a separate, single example focused on showing different third-party providers (example: script-component-recipes
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! If you need any help with that just let me know 🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is amazing, thank you!
return ( | ||
<> | ||
<Component {...pageProps} /> | ||
{pathname !== "/" && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this pattern, great idea 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Adds some script component examples similar to the code showcased on the documentation