Open mujtabahasni opened 5 years ago
If the <SkeletonProvider /> contains any childless components, it may cause a type error if the default children prop value is null. It should skip over any such components as there is no content to skeletonize.
<SkeletonProvider />
null
const ChildlLessComp = ({ children }) => { return (<span>Hello, World!</span)) } ChildlessComp.propTypes = { children: PropTypes.node } ChildlessComp.defaultProps = { children: null } const WrappedComp = () => ( <SkeletonProvider show={true}> <ChildLessComp skeleton> </SkeletonProvider> )
Do not wrap childless components.
Apply fix in PR: https://github.com/telus/tds-community/pull/254
hey @invalidred any updates on this issue?
Description
If the
<SkeletonProvider />
contains any childless components, it may cause a type error if the default children prop value isnull
. It should skip over any such components as there is no content to skeletonize.Reproduction Steps
Workaround details
Do not wrap childless components.
Recommendation
Apply fix in PR: https://github.com/telus/tds-community/pull/254
Meta