Closed patrykgulas closed 6 years ago
The error is a bit confusing, but essentially you need to skip type
and showLoadingAnimation
. Since you're passing a custom placeholder, those two props don't apply anymore.
This is specified as a union type in the props definitions.
Essentially this should typecheck fine:
<ReactPlaceholder
customPlaceholder={awesomePlaceholder}
ready={!isLoading}
/>
Closing the issue, as this should solve it, feel free to comment here if you have further problems and we can re-open it.
When I try to pass Element to customPlaceholder prop it returns following type error:
Type 'element' is not assignable to type 'undefined'.
Also, type prop is required but we shouldn't pass it using
customPlaceholder
. Is it something to fix or I'm doing something wrong?