Repository navigation
fix: Render interpolated text in native views - #533
begenchgeldyev wants to merge 1 commit into
Conversation
|
Hi @begenchgeldyev! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Summary
On native,
<html.div>Count: {count}</html.div>is empty because React Native receives raw text children under a view. Wrap text-only siblings in the same nativeTextused for a single string. Leave children that include elements untouched.Fixes #525.
Evidence
Text strings must be rendered within a <Text> component.Count: 3in the Android view hierarchy without those errors. The single-string and nested-element controls render in both runs.npm test: 910 passed, 2 skipped.npm run format:reportpassed.Merge Danger
Door: Two-way. Blast radius: Native views. No web changes.