Skip to content
New issue

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

Component prop should be optional #2769

Merged
merged 3 commits into from
Feb 6, 2018

Conversation

bradjohns0n
Copy link
Contributor

The interface SceneProps should have the component prop set to optional (?), because it won't build in typescript when using a Nested Scene for Tabs. The docs claim to have this prop as and (semi)-optional.

@aksonov
Copy link
Owner

aksonov commented Jan 8, 2018

I can approve it, but probably it is better to make component required for Scene and use other container types for containers - Tabs, Stack, Drawer, does it make sense?

@bradjohns0n
Copy link
Contributor Author

I see, you are absolutely right. I missed the Tabs (<Tabs> or <Scene tabs>) part. I was using <Scene tabs> construction.

@maxencehenneron
Copy link
Contributor

Right, but shouldn't we deprecate the old syntax and update the docs to remove all the ? It's kind of confusing for typescript users

@aksonov aksonov merged commit 0d528d8 into aksonov:master Feb 6, 2018
@bradjohns0n
Copy link
Contributor Author

@aksonov could you bump the version, please?

mvanroon pushed a commit to mvanroon/react-native-router-flux that referenced this pull request Feb 15, 2018
* Quick fixes for typing errors on: error TS2411

* Component should be optional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants