Skip to content

Script examples#31181

Merged
styfle merged 21 commits intocanaryfrom
script-examples
Nov 16, 2021
Merged

Script examples#31181
styfle merged 21 commits intocanaryfrom
script-examples

Conversation

@goncy
Copy link
Copy Markdown
Contributor

@goncy goncy commented Nov 8, 2021

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

@ijjk ijjk added type: documentation examples Issue was opened via the examples template. labels Nov 8, 2021
<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
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor

@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!

Comment thread examples/script-component/pages/lazy.js Outdated
Comment thread examples/script-component/pages/_app.js Outdated
return (
<>
<Component {...pageProps} />
{pathname !== "/" && (
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

@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 was opened via the examples template.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants