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]: v7 Default Export Causes Component to Fail #12326

Open
dyeoman2 opened this issue Nov 20, 2024 · 1 comment
Open

[Bug]: v7 Default Export Causes Component to Fail #12326

dyeoman2 opened this issue Nov 20, 2024 · 1 comment

Comments

@dyeoman2
Copy link

dyeoman2 commented Nov 20, 2024

What version of React Router are you using?

7.0.0-pre.6

Steps to Reproduce

  1. Set up a React application using React Router 7 (^7.0.0-pre.6).
  2. Create a component that uses the ShadCN Dialog component or AliceCarouselModule from "react-alice-carousel".
  3. Export this component as a default export.
  4. Use this default-exported component in a React Router 7 route.

Expected Behavior

The component containing the ShadCN Dialog or AliceCarouselModule should render correctly regardless of whether it is exported as a default or named export.

Actual Behavior

The component containing the ShadCN Dialog or AliceCarouselModule renders correctly when it is exported as a named export but fails to render when exported as a default export.

When adding a log inside of the component that is exported as a default export, the data comes across as undefined but comes through correctly when exported as a named export.

This behavior did not occur prior to migrating from Remix to React Router 7.

@dyeoman2 dyeoman2 added the bug label Nov 20, 2024
@dyeoman2 dyeoman2 changed the title [Bug]: v7 Default Export Causes Dialog Component to Fail [Bug]: v7 Default Export Causes Component to Fail Nov 20, 2024
@timdorr
Copy link
Member

timdorr commented Nov 21, 2024

Can you recreate this with an example on StackBlitz or a similar service?

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

2 participants