Skip to content

React Components can't be used as placeholders #7

Closed
@anjopater

Description

@anjopater

Nice library!

I'm trying to render other component as a placeholder using the placeholder prop, and I'm I tested pass a class component or stateless component but it's throwing this error
index.js:2178 uncaught at fetch Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in. Check the render method of t.

image

So how I should use this prop?

Also If I try to pass the component as placeholder={<MyComponent />}
I'm getting this

index.js:2178 uncaught at fetch TypeError: this.placeholder.getBoundingClientRect is not a function

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions