Skip to content

Set lazyLoadTabs to false by default#252

Merged
svara merged 1 commit into
mainfrom
lazy-load-tabs-default
Jul 7, 2026
Merged

Set lazyLoadTabs to false by default#252
svara merged 1 commit into
mainfrom
lazy-load-tabs-default

Conversation

@svara

@svara svara commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR changes the default of HotwireTabBarController's lazyLoadTabs initializer parameter (introduced in #250) from true to false, making lazy tab loading opt-in.

Eager loading — every tab performing its initial visit when load(_:) is called — is the behavior shipped in 1.2.2 and earlier. The lazy-by-default setting from #194/#250 was never part of a tagged release, so defaulting to false preserves released behavior with no breaking changes.

This also aligns the API with Android, where lazyLoadTabs on HotwireBottomNavigationController defaults to false (hotwired/hotwire-native-android#202) — same name, same placement, same default on both platforms.

Changes

  • lazyLoadTabs now defaults to false; pass true to defer each tab's initial visit until the tab is first selected (the initially selected tab still loads right away):

    HotwireTabBarController(lazyLoadTabs: true)
  • Documentation updated to reflect the eager default.

  • The demo app opts in to lazyLoadTabs to exercise the behavior, matching the Android demo.

@svara
svara marked this pull request as ready for review July 7, 2026 07:09
@svara
svara merged commit 65e5e21 into main Jul 7, 2026
1 check passed
@svara
svara deleted the lazy-load-tabs-default branch July 7, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant