Skip to content

Comments

feat(Tabs): remove freezeContents & placeholder props#3673

Open
kkafar wants to merge 6 commits intomainfrom
@kkafar/tabs-remove-freeze-integration
Open

feat(Tabs): remove freezeContents & placeholder props#3673
kkafar wants to merge 6 commits intomainfrom
@kkafar/tabs-remove-freeze-integration

Conversation

@kkafar
Copy link
Member

@kkafar kkafar commented Feb 20, 2026

Description

Remove freezeContents & placeholder props
We no longer intend to support freeze integration directly.
We push this possibility to downstream solutions, which have all
necessary building blocks to integrate with react-freeze.

Closes https://github.com/software-mansion/react-native-screens-labs/issues/979

Changes

I've removed them from public types & also removed logic inside TabsScreen component
that has been there to facilitate freeze integration.

I've also updated / removed tests that used these props. Please see particular commits for details.

Visual documentation

N/A

Test plan

We've removed a feature. We no longer need to test for it.

Checklist

  • Included code example that can be used to test this change.
  • Updated / created local changelog entries in relevant test files.
  • For visual changes, included screenshots / GIFs / recordings documenting the change.
  • For API changes, updated relevant public types.
  • Ensured that CI passes

We no longer intend to support freeze integration directly.
We push this possibility to downstream solutions, which have all
necessary building blocks to integrate with `react-freeze`.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the freezeContents and placeholder props from the experimental Tabs.Screen API and deletes the corresponding react-freeze integration logic from the TabsScreen component, pushing freeze behavior to downstream integrations.

Changes:

  • Removed placeholder and freezeContents from TabsScreenProps public typings.
  • Removed react-freeze usage and all shouldFreeze/visibility-tracking logic from TabsScreen.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/components/tabs/TabsScreen.types.ts Removes the two public props from the TabsScreenProps interface.
src/components/tabs/TabsScreen.tsx Removes Freeze wrapper and freeze decision logic from the component render path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 109 to 113
// `TabsScreen [${componentNodeHandle.current ?? -1}] render; tabKey: ${
// rest.tabKey
// } isFocused: ${isFocused} nativeViewIsVisible: ${nativeViewIsVisible}`,
// );

Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There’s a commented-out bottomTabsDebugLog block that still interpolates nativeViewIsVisible, but that state was removed. This comment is now misleading and easy to accidentally uncomment into a runtime error; please delete it or update it to match the current state/props being logged.

Suggested change
// `TabsScreen [${componentNodeHandle.current ?? -1}] render; tabKey: ${
// rest.tabKey
// } isFocused: ${isFocused} nativeViewIsVisible: ${nativeViewIsVisible}`,
// );
// `TabsScreen [${componentNodeHandle.current}] render; tabKey: ${rest.tabKey} isFocused: ${isFocused}`,
// );

Copilot uses AI. Check for mistakes.
This is the test originally added in #3115
that introduced `freezeContents`.
I remove it completely since we no longer support that feature.
Shouldn't be affected. Both of these tests **turned off** the
`freezeContents` explicitly
Similarly - it shouldn't be affected. It disabled the `freezeContents`
explicitly.

I've also fixed the usage of already removed icon API
@kkafar kkafar marked this pull request as ready for review February 20, 2026 16:25
Copy link
Contributor

@kligarski kligarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also remove enableFreeze(true) from tests related to bottom tabs (it shouldn't be there in the first place as we have global switch in App.tsx) like Test3596, TestBottomTabs, ... but it's not necessary to proceed.

Copy link
Contributor

@t0maboro t0maboro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great to coordinate this with other PRs introducing breaking changes to Tabs, so we can handle them with a single compatibility flag.

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