@momo-kits/foundation 0.165.1-beta.2 → 0.165.1-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -238,11 +238,14 @@ const BottomTab: React.FC<BottomTabProps> = ({
238
238
  });
239
239
  }, [itemWidth, indicatorAnimated]);
240
240
 
241
- // `initialRouteName` can start on a later tab, so report where we actually begin instead of
242
- // waiting for the first tab switch to correct it.
243
- useEffect(() => {
244
- reportFloatingArrowBack(activeIndex.current !== 0);
245
- }, [reportFloatingArrowBack]);
241
+ // Tied to focus, not mount: a screen pushed from a tab leaves BottomTab mounted but blurred,
242
+ // and the flag has to be off there. Also covers `initialRouteName` starting on a later tab.
243
+ useFocusEffect(
244
+ React.useCallback(() => {
245
+ reportFloatingArrowBack(activeIndex.current !== 0);
246
+ return () => reportFloatingArrowBack(false);
247
+ }, [reportFloatingArrowBack]),
248
+ );
246
249
 
247
250
  /**
248
251
  * Two halves of one decision, so they are set together.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.165.1-beta.2",
3
+ "version": "0.165.1-beta.3",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},