fix: invoke render function children instead of rendering as JSX component#2636
Open
linkeryoon wants to merge 1 commit intogorhom:masterfrom
Open
fix: invoke render function children instead of rendering as JSX component#2636linkeryoon wants to merge 1 commit intogorhom:masterfrom
linkeryoon wants to merge 1 commit intogorhom:masterfrom
Conversation
…onent
This reverts the regression introduced during the v5 migration,
where Content({ data }) was changed back to <Content data={data} />.
Originally fixed in gorhom#1750 but lost during the v5 codebase migration.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
TwanLuttik
added a commit
to TwanLuttik/react-native-bottom-sheet
that referenced
this pull request
Apr 8, 2026
- Replace deprecated Animated.AnimateProps with AnimatedProps (fixes reanimated v4 compatibility) - Fix onScroll prop being incorrectly omitted from BottomSheetFlatListProps types - Invoke render function children directly instead of as JSX component to avoid unnecessary re-renders - Inline FlashListProps type to remove @shopify/flash-list type dependency Fixes: gorhom#2524, gorhom#2629, gorhom#2636, gorhom#2620
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This reverts the regression introduced during the v5 migration, where
Content({ data })was changed back to<Content data={data} />.This fix was originally introduced in #1750 but was lost during the v5 codebase migration.
Problem
As
datais an object, rendering<Content data={data} />creates unnecessary re-renders due to unstable function references. InvokingContent({ data })directly avoids this issue.Solution