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

Ignore null children in the tab-bar. #86

Merged
merged 1 commit into from
Aug 4, 2016
Merged

Ignore null children in the tab-bar. #86

merged 1 commit into from
Aug 4, 2016

Conversation

mvantellingen
Copy link
Contributor

This allows you to render tab items conditonally since the false
condition returns null in that case.

This allows you to render tab items conditonally since the false
condition returns null in that case.
@mvantellingen
Copy link
Contributor Author

This allows the following constructs:

  return (
    <TabNavigator>
      // Other TabNavigator.Item

      {(() => {
        if (debug) {
          return (
            <TabNavigator.Item title="Debug">
              <Debug navigator={navigator}/>
            </TabNavigator.Item>
          )
        }
      })()}
    </TabNavigator>
  )

@ide ide merged commit f7bd585 into ptomasroos:master Aug 4, 2016
@ide
Copy link
Contributor

ide commented Aug 4, 2016

Published in 0.3.3.

mikelambert pushed a commit to mikelambert/react-native-tab-navigator that referenced this pull request Sep 28, 2016
This allows you to render tab items conditonally since the false
condition returns null in that case.
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.

2 participants