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

[Tutorial] Chapter 2: Wrap rendered <article> in React fragments #5020

Merged
merged 2 commits into from
Apr 5, 2022

Conversation

Philzen
Copy link
Contributor

@Philzen Philzen commented Apr 4, 2022

This avoids warning 'ArticlesCell' cannot be used as a JSX component. Its return type 'Element[]' is not a valid JSX element..

Closes #5008

@netlify
Copy link

netlify bot commented Apr 4, 2022

Deploy Preview for redwoodjs-docs ready!

Name Link
🔨 Latest commit a2c3b96
🔍 Latest deploy log https://app.netlify.com/sites/redwoodjs-docs/deploys/624a450c2603a3000836ee17
😎 Deploy Preview https://deploy-preview-5020--redwoodjs-docs.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.

This avoids warning `'ArticlesCell' cannot be used as a JSX component.
Its return type 'Element[]' is not a valid JSX element.`.

Closes redwoodjs#5008
@Philzen Philzen force-pushed the 5008-avoid-jsx-element-warning branch from d5d5baa to b117719 Compare April 4, 2022 01:07
@simoncrypta simoncrypta requested a review from cannikin April 4, 2022 11:45
@cannikin
Copy link
Member

cannikin commented Apr 5, 2022

Thanks! Are there any further instances of these same code snippets further on, or are these the only three?

@cannikin cannikin added the release:fix This PR is a fix label Apr 5, 2022
@Philzen
Copy link
Contributor Author

Philzen commented Apr 5, 2022

Are there any further instances of these same code snippets further on, or are these the only three?

@cannikin at least as far as i could see – i searched through the tutorial until chapter 5 where the wrapper is different (and valid) already b/c of the tailwind redesign introduced during the "intermission" chapter.

@cannikin
Copy link
Member

cannikin commented Apr 5, 2022

Great, thanks!

@cannikin cannikin merged commit b305719 into redwoodjs:main Apr 5, 2022
@jtoar jtoar added this to the next-release milestone Apr 5, 2022
@Philzen Philzen deleted the 5008-avoid-jsx-element-warning branch April 5, 2022 20:37
Philzen added a commit to Philzen/redwood that referenced this pull request Apr 5, 2022
Avoid invalid JSX element array, similar to redwoodjs#5020
@thedavidprice thedavidprice modified the milestones: next-release, v1.1.0 Apr 15, 2022
jtoar added a commit that referenced this pull request May 4, 2022
…tutorial chapter 6 (#5058)

* Remove unnecessary highlight (line is generated by default)

* Keep React fragment as wrapping container

Avoid invalid JSX element array, similar to #5020

* Fix highlighting b/c that lines actually changed as well

* Add back highlight

Going to add this back for now since it's used in the example

Co-authored-by: Dominic Saadi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
No open projects
Status: Archived
Development

Successfully merging this pull request may close these issues.

[Tutorial w/TypeScript] Warning: 'ArticlesCell' return type 'Element[]' not a valid JSX element.
4 participants