Skip to content
This repository has been archived by the owner on Jun 24, 2023. It is now read-only.

_source added to Fragment #38

Open
hasparus opened this issue Jan 8, 2023 · 1 comment · May be fixed by #44
Open

_source added to Fragment #38

hasparus opened this issue Jan 8, 2023 · 1 comment · May be fixed by #44

Comments

@hasparus
Copy link

hasparus commented Jan 8, 2023

Sup folks. Firstly, I love this package. Thank you so much for your work on it.

I've encountered the following error from React.

`_source` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.

_source is added to props of every element, including fragments.
After a quick skim of the code, I think it happens here:
https://github.com/pmndrs/react-three-editor/blob/main/packages/vite/src/babel/babel.ts#L240-L253

I suppose I should ask — can anything break if I added an if statement there to avoid adding _source to Fragments?
Is there any other piece of the code that expects _source to be given to all elements?

@hasparus hasparus changed the title _source added to Fragment _source added to Fragment Jan 8, 2023
@nksaraf
Copy link
Collaborator

nksaraf commented Jan 8, 2023

No that would be perfect!

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

Successfully merging a pull request may close this issue.

2 participants