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

Script examples #31181

Merged
merged 21 commits into from
Nov 16, 2021
Merged

Script examples #31181

merged 21 commits into from
Nov 16, 2021

Conversation

goncy
Copy link
Contributor

@goncy goncy commented Nov 8, 2021

Adds some script component examples similar to the code showcased on the documentation

@@ -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>
Copy link
Collaborator

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)

Copy link
Contributor Author

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 🙌

housseindjirdeh
housseindjirdeh previously approved these changes Nov 9, 2021
Copy link
Collaborator

@housseindjirdeh housseindjirdeh left a 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 !== "/" && (
Copy link
Member

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 👍

styfle
styfle previously approved these changes Nov 15, 2021
Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@styfle styfle merged commit d550b13 into canary Nov 16, 2021
@styfle styfle deleted the script-examples branch November 16, 2021 16:47
@vercel vercel locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants