wing
wing
Hi @gorhom! I don't think it's solved with the linked PR. The changes there were released in `3.16.5`. The reproduction uses `3.16.7` ([reference](https://github.com/winghouchan/react-native-bottom-sheet-strict-mode-mcve/blob/1589055f7a5e11488a741b9a52acc8905e29f19f/yarn.lock#L6052-L6053)). Also see the new issue I've opened...
https://github.com/user-attachments/assets/3c0a9957-b8e9-40c1-a926-8eff9c25624e Interestingly, the bottom sheet is attached to the component tree but it isn't displayed on screen. Observe that the `PortalHost` has no children initially but when the "Present Modal"...
https://github.com/user-attachments/assets/a8815a36-688b-4848-a535-8e3bd8e2be8d Another observation: the modal can be opened in Strict Mode if: 1. Strict Mode was initially disabled. 2. While Strict Mode was initially disabled, the modal was opened. 3....
Found there's a [logger](https://github.com/gorhom/react-native-bottom-sheet/blob/e5d8aba49de1788ec309698a7170c2d3cc2eef4d/src/utilities/logger.ts) 😄 Here are the logs: ``` LOG [BottomSheetContainer::handleContainerLayout] height:852 LOG [handlePresent] LOG [handlePortalOnUnmount] minimized:false forcedDismissed:false ERROR Warning: findHostInstance_DEPRECATED is deprecated in StrictMode. findHostInstance_DEPRECATED was passed an...
For comparison, these are the logs when Strict Mode is disabled: ``` LOG [BottomSheetContainer::handleContainerLayout] height:852 LOG [handlePresent] LOG [BottomSheetView::handleLayout] height:426 LOG [BottomSheetHandleContainer::handleContainerLayout] height:24 LOG [fun::useAnimatedReaction::OnSnapPointChange] result:426 LOG [fun::bound animateToPosition_Gorhom_BottomSheetTsx12] currentPosition:852...
Based on the first difference between the logs, I decided to take a look at the function where ` [fun::useAnimatedReaction::OnSnapPointChange] result:426` is logged: https://github.com/gorhom/react-native-bottom-sheet/blob/e5d8aba49de1788ec309698a7170c2d3cc2eef4d/src/components/bottomSheet/BottomSheet.tsx#L1546-L1581 Looking at the value of variables...
`isLayoutCalculated` is derived as follows: https://github.com/gorhom/react-native-bottom-sheet/blob/e5d8aba49de1788ec309698a7170c2d3cc2eef4d/src/components/bottomSheet/BottomSheet.tsx#L255-L297 In my observations, the values for the three values that determine `isLayoutCalculated` are: - `isContainerHeightCalculated: true` - `isHandleHeightCalculated: false` - `isSnapPointsNormalized : true` `isHandleHeightCalculated`...
So `BottomSheet` passes `animatedHandleHeight` to `BottomSheetHandleContainer`: https://github.com/gorhom/react-native-bottom-sheet/blob/e5d8aba49de1788ec309698a7170c2d3cc2eef4d/src/components/bottomSheet/BottomSheet.tsx#L1925 `BottomSheetHandleContainer` then sets a value to `animatedHandleHeight` on layout: https://github.com/gorhom/react-native-bottom-sheet/blob/e5d8aba49de1788ec309698a7170c2d3cc2eef4d/src/components/bottomSheetHandleContainer/BottomSheetHandleContainer.tsx#L109-L129 This is observed in both Strict Mode enabled and disabled cases as the...
In my previous comment, I said: > In the case of Strict Mode enabled, it looks like `animatedHandleHeight` doesn't get its new value from the `BottomSheetHandleContainer` but retains the `INITIAL_HANDLE_HEIGHT`...
Hmm, the `setTimeout` workaround doesn't seem to be foolproof. If `enableDynamicSizing` is `true` it doesn't always work (~10% of the time) and a different issue where the sheet takes the...