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

Docs: Next Integration - location of react components #174

Open
iurii-kyrylenko opened this issue Jul 1, 2024 · 4 comments
Open

Docs: Next Integration - location of react components #174

iurii-kyrylenko opened this issue Jul 1, 2024 · 4 comments

Comments

@iurii-kyrylenko
Copy link

From documentation:

Step 7
Go to the src/pages folder and create a new, standalone file with name of your component (for example MyComponent.tsx).

This does't work in App Router mode. The production build (npm run build) fails with error:

 TypeError: Cannot read properties of undefined (reading 'forwardRef')

I think that correct place for the MyComponent.tsx is the src/components folder.

@iprzybysz
Copy link
Contributor

Hi, it can be a workaround for now. If some of our components have a problem with forwardRef during the build, you can create a component for them.

@iurii-kyrylenko
Copy link
Author

Hi, it can be a workaround for now. If some of our components have a problem with forwardRef during the build, you can create a component for them.

Thank you, @iprzybysz

@iurii-kyrylenko
Copy link
Author

you can create a component for them.

@iprzybysz, Do you mean: you can create an issue for them?

@iprzybysz
Copy link
Contributor

You could organize it by placing it in the src/components directory, and create components there that encapsulate specific TWE component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants