You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently experiencing an issue passing a HOC directly to another component that is expecting the React Component to have .prototype.isReactComponent available. The HOC is react-intl and it's using this package to clone a WrappedComponent. The prototype property is added by React to allow others to easily check if a function is a React Component, which is used by react-table.
Seeing as this package is cloning React components, should this one prototype property be cloned too?
This current fix is to add this manaully before exporting:
Since this is a react specific property and not a static, I don't think it's right for this library to be hoisting it.
With that said, I don't see any reason why that property would not be available on an instance of the component since injectIntl is using a class that extends React.Component which defines that property.
I would also suggest not using that property on the prototype since it is subject to change as per Dan Abramov.
Hi
I'm currently experiencing an issue passing a HOC directly to another component that is expecting the React Component to have
.prototype.isReactComponent
available. The HOC is react-intl and it's using this package to clone a WrappedComponent. The prototype property is added by React to allow others to easily check if a function is a React Component, which is used by react-table.Seeing as this package is cloning React components, should this one prototype property be cloned too?
This current fix is to add this manaully before exporting:
The text was updated successfully, but these errors were encountered: