We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v5 breaks support for rendering components with hooks in props such as accessoryLeft due to the implementation of: https://github.com/akveo/react-native-ui-kitten/blob/next/src/components/devsupport/components/falsyFC/falsyFC.component.tsx
accessoryLeft
FalsyFC should not make the assumption that components are plain functions. It should properly use React.createElement so hooks continue working.
FalsyFC
React.createElement
const MyHookComponent = () => { const [name, setName] = React.useState(''); React.useEffect(() => { setName('test'); }); return <Text>{name}</Text>; }; const MyApp = () => ( <TopNavigation accessoryLeft={MyHookComponent} title={"test"} /> );
For FalsyFC to render components with hooks by properly using React.createElement.
The text was updated successfully, but these errors were encountered:
@Photonios thanks for reporting and pointing for the possible solution.
As a workaround, you may create a function that renders a function component: https://snack.expo.io/AAtTzHId3
Sorry, something went wrong.
FalsyFC should be able to render components with hooks
2e66f5a
Closes akveo#1015
fix(components): FalsyFC should be able to render components with hooks
f5c463b
46a26dc
fix(components): FalsyText should be able to render components with h…
60729a1
…ooks Closes akveo#1015
No branches or pull requests
🐛 Bug Report
v5 breaks support for rendering components with hooks in props such as
accessoryLeft
due to the implementation of: https://github.com/akveo/react-native-ui-kitten/blob/next/src/components/devsupport/components/falsyFC/falsyFC.component.tsxFalsyFC
should not make the assumption that components are plain functions. It should properly useReact.createElement
so hooks continue working.To Reproduce
Expected behavior
For
FalsyFC
to render components with hooks by properly usingReact.createElement
.UI Kitten and Eva version
The text was updated successfully, but these errors were encountered: