Skip to content

Conversation

@hurali97
Copy link
Member

Summary

Fixes #3085

Introduces getLazy callback prop which allows the user to set lazy for each screen as they want leveraging the route parameter received in the callback. If user wants to set lazy for every screen, they can simply return true from the callback.

Usage:

      <BottomNavigation
        {...otherProps}
        getLazy={({ route }) => route.key !== 'album'}
      />

Test plan

Unit test coverage 🧪

@callstack-bot
Copy link

callstack-bot commented Oct 25, 2022

Hey @hurali97, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

@github-actions
Copy link

The mobile version of example app from this branch is ready! You can see it here

.

1 similar comment
@github-actions
Copy link

The mobile version of example app from this branch is ready! You can see it here

.

@lukewalczak
Copy link
Member

That PR will need the following changes in the material-bottom-tabs repository once the stable version is released.

@lukewalczak lukewalczak requested a review from satya164 October 26, 2022 11:12
@github-actions
Copy link

The mobile version of example app from this branch is ready! You can see it here

.

@github-actions
Copy link

The mobile version of example app from this branch is ready! You can see it here

.

@github-actions
Copy link

The mobile version of example app from this branch is ready! You can see it here

.

@lukewalczak lukewalczak merged commit 61be62a into main Oct 31, 2022
@lukewalczak lukewalczak deleted the feat/lazy-bottom-navigation branch October 31, 2022 11:08
slavikdenis pushed a commit that referenced this pull request Nov 8, 2022
Co-authored-by: Luke Walczak <lukasz.walczak.pwr@gmail.com>
slavikdenis pushed a commit that referenced this pull request Nov 8, 2022
Co-authored-by: Luke Walczak <lukasz.walczak.pwr@gmail.com>
slavikdenis pushed a commit that referenced this pull request Nov 8, 2022
Co-authored-by: Luke Walczak <lukasz.walczak.pwr@gmail.com>
slavikdenis pushed a commit that referenced this pull request Nov 8, 2022
Co-authored-by: Luke Walczak <lukasz.walczak.pwr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an option to prevent lazy on @react-navigation/material-bottom-tabs.

4 participants