feat(Tabs): remove freezeContents & placeholder props#3673
feat(Tabs): remove freezeContents & placeholder props#3673
freezeContents & placeholder props#3673Conversation
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`.
There was a problem hiding this comment.
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
placeholderandfreezeContentsfromTabsScreenPropspublic typings. - Removed
react-freezeusage and allshouldFreeze/visibility-tracking logic fromTabsScreen.
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.
src/components/tabs/TabsScreen.tsx
Outdated
| // `TabsScreen [${componentNodeHandle.current ?? -1}] render; tabKey: ${ | ||
| // rest.tabKey | ||
| // } isFocused: ${isFocused} nativeViewIsVisible: ${nativeViewIsVisible}`, | ||
| // ); | ||
|
|
There was a problem hiding this comment.
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.
| // `TabsScreen [${componentNodeHandle.current ?? -1}] render; tabKey: ${ | |
| // rest.tabKey | |
| // } isFocused: ${isFocused} nativeViewIsVisible: ${nativeViewIsVisible}`, | |
| // ); | |
| // `TabsScreen [${componentNodeHandle.current}] render; tabKey: ${rest.tabKey} isFocused: ${isFocused}`, | |
| // ); |
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
kligarski
left a comment
There was a problem hiding this comment.
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.
t0maboro
left a comment
There was a problem hiding this comment.
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.
Description
Remove
freezeContents&placeholderpropsWe 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
TabsScreencomponentthat 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