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

Bug: Error occurs when returning empty fragment '<></>' on a page #26295

Closed
Willienn opened this issue Mar 3, 2023 · 4 comments
Closed

Bug: Error occurs when returning empty fragment '<></>' on a page #26295

Willienn opened this issue Mar 3, 2023 · 4 comments

Comments

@Willienn
Copy link

Willienn commented Mar 3, 2023

In was working when i comment a code and see this error
Then i start to test possible ways of reproduce the bug
Notes:
1.using <>{null}</> dont give the error
2.using <>{undefined}</> give the error

React version: 18.2.0

Steps To Reproduce

1.import { Fragment } from "react";

export default async function Companies() {
return (
{/* Or => <></>*/}
);
}

2.Start the localHost (dev server, etc)

The current behavior

image

The expected behavior

image

@Willienn Willienn added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Mar 3, 2023
@eps1lon
Copy link
Collaborator

eps1lon commented Mar 3, 2023

We have this tracked internally. But thanks for flagging. Same applies to returning undefined directly.

@eps1lon eps1lon added Type: Bug Component: Server Rendering and removed Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Mar 3, 2023
@Krishkumarchhabra25

This comment was marked as spam.

@daphillipescode
Copy link

Is it fix?

@eps1lon
Copy link
Collaborator

eps1lon commented Apr 16, 2023

Fixed in #26349

@eps1lon eps1lon closed this as completed Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants