Closed simvi closed 7 months ago
@simvi
Do you recall if running patch-package
for this library was an incredibly slow operation? I'm currently trying to run a patch on it myself and it seems like it's hanging.
@simvi Do you recall if running
patch-package
for this library was an incredibly slow operation? I'm currently trying to run a patch on it myself and it seems like it's hanging.
We were also struggling with npm
, using yarn
solved the problem.
To anyone interested, this is why Icon
must be a React.FC
, it is being called like a component here, not a ReactNode
.
If Icon
was truly meant to be a ReactNode
, renderIcon
would look like this:
renderIcon() {
const { style, Icon } = this.props;
if (!Icon) {
return null;
}
return (
<View
testID="icon_container"
style={[defaultStyles.iconContainer, style.iconContainer]}
>
{Icon}
</View>
);
}
P.S. To get around this issue I created a Functional Component to input to Icon
typed as a React.FC
with a // @ts-expect-error
.
dupe of #478 - prs to fix this are welcome
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
react-native-picker-select@8.0.4
for the project I'm working on.The type of Icon was invalid for Icon prop.
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.