Skip to content

fix: codegen import to ensure better compatibility with older RN versions - #1595

Merged
kirillzyusko merged 1 commit into
mainfrom
fix/codegen-import
Aug 10, 2026
Merged

fix: codegen import to ensure better compatibility with older RN versions#1595
kirillzyusko merged 1 commit into
mainfrom
fix/codegen-import

Conversation

@kirillzyusko

@kirillzyusko kirillzyusko commented Aug 10, 2026

Copy link
Copy Markdown
Owner

📜 Description

Use old import of codegenNativeComponent from react-native/Libraries/Utilities/codegenNativeComponent" instead of react-native (because react-native import was added relatively recently).

💡 Motivation and Context

This matches the whole setup of all components included in this package. At sme point we will switch to react-native import, but in this case we'll drop minimal supported RN version and it needs to be reflected in documentation. For now just use old approach that gives a wider compatibility.

Closes #1585 (comment)

📢 Changelog

JS

  • use old import of codegenNativeComponent from react-native/Libraries/Utilities/codegenNativeComponent";

🤔 How Has This Been Tested?

Tested via this PR.

📸 Screenshots (if appropriate):

image

📝 Checklist

  • CI successfully passed
  • I added new mocks and corresponding unit-tests if library API was changed

@kirillzyusko kirillzyusko self-assigned this Aug 10, 2026
@kirillzyusko kirillzyusko added the 🎯 crash Library triggers a crash of the app label Aug 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📊 Package size report

Current size Target Size Difference
334431 bytes 334380 bytes 51 bytes 📈

@kirillzyusko
kirillzyusko marked this pull request as ready for review August 10, 2026 09:55
@github-actions

Copy link
Copy Markdown
Contributor
  1. Incorrect Import Path
    Why: The updated import path for codegenNativeComponent may not exist or could lead to runtime errors if the module isn't found.
    Fix: Revert the import statement to its original form unless there's a verified need for the new path.

LGTM

@kirillzyusko
kirillzyusko merged commit f66b6c3 into main Aug 10, 2026
20 checks passed
@kirillzyusko
kirillzyusko deleted the fix/codegen-import branch August 10, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎯 crash Library triggers a crash of the app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Android] compileReleaseKotlin fails on RN < 0.74 since 1.21.0: Unresolved reference ClippingScrollViewDecoratorViewManager (wrong package declaration)

1 participant