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
Tell us which versions you are using:
When using typescript I expect there to be no error when I don't supply a component using a drawer.
I get the following error using Typescript with the following Scene JSX:
<Scene key="drawer" drawer={true} contentComponent={NavDrawer} hideNavBar={true} drawerIcon={this.navDrawerImage()} >
src/App.tsx(103,10): error TS2322: Type '{ key: "drawer"; drawer: true; contentComponent: ComponentClass<Pick<Props & Actions, never>> & {...' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<SceneProps & TabsProps & TabSceneProps &...'. Type '{ key: "drawer"; drawer: true; contentComponent: ComponentClass<Pick<Props & Actions, never>> & {...' is not assignable to type 'Readonly<SceneProps & TabsProps & TabSceneProps & DrawerProps & ModalProps>'. Property 'component' is missing in type '{ key: "drawer"; drawer: true; contentComponent: ComponentClass<Pick<Props & Actions, never>> & {...'.
For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.
I think this could be fixed by changing:
component: React.ComponentType<any>
to
component?: React.ComponentType<any>
The text was updated successfully, but these errors were encountered:
Dito. Very annoying
Sorry, something went wrong.
+1
Should be fixed now
No branches or pull requests
Version
Tell us which versions you are using:
Expected behaviour
When using typescript I expect there to be no error when I don't supply a component using a drawer.
Actual behaviour
I get the following error using Typescript with the following Scene JSX:
src/App.tsx(103,10): error TS2322: Type '{ key: "drawer"; drawer: true; contentComponent: ComponentClass<Pick<Props & Actions, never>> & {...' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<SceneProps & TabsProps & TabSceneProps &...'.
Type '{ key: "drawer"; drawer: true; contentComponent: ComponentClass<Pick<Props & Actions, never>> & {...' is not assignable to type 'Readonly<SceneProps & TabsProps & TabSceneProps & DrawerProps & ModalProps>'.
Property 'component' is missing in type '{ key: "drawer"; drawer: true; contentComponent: ComponentClass<Pick<Props & Actions, never>> & {...'.
Steps to reproduce
For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.
Fix
I think this could be fixed by changing:
to
The text was updated successfully, but these errors were encountered: