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

Update "Fragments & Multiple Elements" examples #778

Merged
merged 9 commits into from
Jun 22, 2022

Conversation

sarah11918
Copy link
Member

  • [X ] New or updated content

Fixes #369

This updates our Muliple Elements example to avoid telling people they MUST use a wrapping element when they don't have to.

Further adds an example of using Fragment to show when it might be useful to do so, since they don't appear to be necessary.

@netlify
Copy link

netlify bot commented Jun 16, 2022

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit 0736aa3
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/62b32483d4c2cb0008624385
😎 Deploy Preview https://deploy-preview-778--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sarah11918 sarah11918 marked this pull request as ready for review June 16, 2022 14:05
@sarah11918 sarah11918 added the improve documentation Enhance existing documentation (e.g. add an example, improve description) label Jun 16, 2022
Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

I thought we decided to keep the fragment wrapping example? The reason being that without the <></> this code breaks if you leave out the wrapping () which is less easy for people to spot as important when following this example.

We can probably relax the phrasing to be less insistent (“must” etc.) though.

@sarah11918
Copy link
Member Author

You're right! It's a good example in and of itself. I'll bring it back in, with less strong wording.

Thoughts on the added example re: good use of <Fragment /> ?

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Took the liberty of trying to write the changes as suggestions. Please feel free to cut/edit/ignore as appropriate 🙌

src/pages/en/core-concepts/astro-components.md Outdated Show resolved Hide resolved
src/pages/en/core-concepts/astro-components.md Outdated Show resolved Hide resolved
sarah11918 and others added 4 commits June 22, 2022 08:29
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
@sarah11918
Copy link
Member Author

Changes incorporated, @delucis ! Care to take another once-over and see how it looks altogether?

@delucis delucis merged commit b8a7f38 into main Jun 22, 2022
@delucis delucis deleted the sarah11918-patch-1-fragments branch June 22, 2022 14:40
yanthomasdev added a commit that referenced this pull request Jun 22, 2022
yanthomasdev added a commit that referenced this pull request Jun 30, 2022
…ges (#819)

* Update `astro-components.md` based on #778 changes

* Add #824 changes

* Fix

* Apply suggestions

Co-authored-by: victor0x16 <100092662+victor0x16@users.noreply.github.com>

Co-authored-by: victor0x16 <100092662+victor0x16@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improve documentation Enhance existing documentation (e.g. add an example, improve description)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better explanation for "Fragments & Multiple Elements"
2 participants