Skip to content

feat: unify initial text/html iOS emitting with Android - #270

Merged
szydlovsky merged 1 commit into
mainfrom
@szydlovsky/unify-initial-emitting
Nov 20, 2025
Merged

szydlovsky merged 1 commit into
mainfrom
@szydlovsky/unify-initial-emitting

Conversation

@szydlovsky

Copy link
Copy Markdown
Collaborator

Summary

After the latest PRs it also came to my mind that Android and iOS emit the initial events a bit differently. If we have some defaultValue set, iOS wouldn't emit text (and would emit html always, even if defaultValue was not set), while Android properly emitted both html and text only if the prop is set.

This PR changes:

  • initial recentlyEmittedHtml value so that it doesn't emit with no defaultValue
  • sets recentlyEmittedString only if the onChangeText event properly wen through (event emitter was defined). This way text emits if it's different than the initial ""

Test Plan

Run the example iOS app once with no defaultValue and the other time with defaultValue. Observe that in the first scenario no initial events are dispatched, while in the second they are emitted as soon as emitter is ready.

Screenshots / Videos

--

Compatibility

OS Implemented
iOS
Android ✅ (was fine already)

@szydlovsky
szydlovsky requested a review from exploIF November 20, 2025 10:26
@szydlovsky
szydlovsky merged commit fe30050 into main Nov 20, 2025
5 checks passed
@szydlovsky
szydlovsky deleted the @szydlovsky/unify-initial-emitting branch November 20, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants