Closed andrew781026 closed 5 years ago
@rcdexta The spread <div {...otherProps}
on this line causes those warnings: https://github.com/rcdexta/react-event-timeline/blob/d35b8330b953faa9791f7689fd9d7ec893c765c4/components/TimelineEvent.js#L91 but the solution is not that simple.
If you actually want users to be able to pass arbitrary props from root TimelineEvent
down to this exact div, you have to use something like lodash's _.omit()
to exclude contentStyle
, cardHeaderStyle
and showContent
props.
If you don't want that, probably better solution would be to explicitly list what you want passed down to this div.
Should be fixed in v1.6.2. Desired props have been whitelisted. Thanks @andrew781026 @hijarian
i got a React prop warning , how can i fix it ?
at https://codesandbox.io/s/13k1jjqj64