bfanger / svelte-preprocess-react

Seamlessly use React components inside a Svelte app
MIT License
126 stars 6 forks source link

React Component Causing Svelte 505 Errors #37

Closed Jholder7 closed 6 months ago

Jholder7 commented 6 months ago

Attempting to use the example as given in the read-me I keep getting:

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Any suggestions on hoe to begin to debug this issue?

bfanger commented 6 months ago

When you write <react:Thing> make sure that Thing is imported and a React component. The error describes that what you passed as Thing is an object instead of a component.