Skip to content

"Export is incompatible", but WHY? #741

Answered by ArnaudBarre
jsimmonstx asked this question in Q&A
Discussion options

You must be logged in to vote

I dumped you code inside a template, it seems fine: https://stackblitz.com/edit/vitejs-vite-dufbhxgt?file=src%2Ftest.tsx

Because the function start with a lowercase, it's not treated as a component, so the update goes up to App.tsx

Given the current code, it seems like it's a Component, and should be called FormTextarea not makeFormTextareaComponent, but either way, the current code is valid.

If the file contains other exports, then you need to have all exports be React component (starts with maj) or no components at all

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by jsimmonstx
Comment options

You must be logged in to vote
1 reply
@ArnaudBarre
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants