Repository navigation
feat: add the streaming prop and streamingConfig.animation - #1150
Closed
hryhoriiK97 wants to merge 10 commits into
Closed
hryhoriiK97 wants to merge 10 commits into
hryhoriiK97 wants to merge 10 commits into
Conversation
This was referenced Nov 9, 2026
hryhoriiK97
force-pushed
the
feat/streaming-api
branch
from
November 11, 2026 09:42
b5d3c65 to
182f716
Compare
This was referenced Nov 11, 2026
hryhoriiK97
force-pushed
the
feat/streaming-api
branch
from
November 11, 2026 19:28
182f716 to
4c4186f
Compare
`streamingAnimation` turned on everything streaming does, not only the
fade: the streaming session (held-back tables, code blocks and media,
repaired inline syntax), the pending code block header and every
arrival animation. It is now `streaming`, with `streamingAnimation` kept
as a deprecated alias (`streaming` wins when both are set).
`streamingConfig.animation` ('fade' by default, or 'none') turns the
arrival animations off without turning streaming off: the text tail
fade, block and table row fades, and the grow-in of blocks drawn by
renderers. Switching it to 'none' (or turning streaming off) shows what
is still fading at once, on both platforms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`streamingAnimation` is documented as `streaming`, with the deprecated alias noted, and `streamingConfig` gains `animation`. Its example is renamed with the prop and now stops streaming once the text is complete. Also corrects the reference: `streamingConfig` works in both flavors, not only `github`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Called when the view stops streaming, once `streaming` turns false. It fires once per stream, from where each host ends streaming, and not when the view unmounts mid-stream. iOS and Android only, like `streaming`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MARKDOWN_STREAMING.md still said "Both modes" and showed an always-on streaming prop. It now mirrors the guide: streaming set while text arrives and turned off at the end, onStreamingEnd, the three block modes with mediaMode, and streamingConfig.animation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dropping `animation` from a copied map allocated two maps per measure and would hash any key added to streamingConfig later. Hashing the three modes, as iOS ENRMStreamingRenderEqual compares them, keeps the key to what changes layout. Tests on both platforms pin that flipping the animation keeps a stream's update on the fast path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
UIView names its alpha animation after the key path, which is not documented; removing all of the segment's animations and setting its alpha does the same without that. Ending a stream and turning the animation off in one update now finishes the animations once. The arrival helper's comment also names the slot grow-in it gates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The animation JSDoc gains the renderer grow-in and Reduce Motion, and onStreamingEnd its once-per-stream contract, as in the API reference. The web stripped-props tables list onStreamingEnd, and the streamingConfig examples end streaming once the document has arrived. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
react-native-streamdown is deprecated in favor of this package's own streaming, which holds back incomplete blocks and repairs half-written syntax natively. streamingAnimation now does that too while it is on, so a view that keeps it on renders a finished message the same way. A one-time development warning points to streaming, and both streaming guides and the README now explain the migration instead of recommending react-native-streamdown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hryhoriiK97
force-pushed
the
feat/streaming-api
branch
from
November 11, 2026 19:50
4c4186f to
fcd0b95
Compare
6 tasks done
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.
What/Why?
streamingAnimationsounds like a fade, but it switches on everything streaming does:There was no way to stream without the fade, and the name hid what the prop is for.
This is the fifth PR of the streaming stack, stacked on #1149. It renames the prop to
streamingand addsstreamingConfig.animation.The streaming stack
streamingandstreamingConfig.animation.createMarkdownStream()withappend/end/reset, text fed to a C++ buffer without a React render per token.'gradient'preset and the animation object.How
streamingreplacesstreamingAnimationin the types, the codegen specs and both platforms.streamingAnimationstays as a deprecated alias:streaming ?? streamingAnimation ?? false, sostreamingwins when both are set. There's no runtime warning:react-native-streamdownsetsstreamingAnimationon every view, so a warning would reach all its users. The@deprecatedtag marks it in editors.streamingConfig.animation:'fade'(default) or'none'.'none'turns off the arrival animations:renderers.streamingas before.'none'mid-stream, or turningstreamingoff, shows what is still fading at once on both platforms. On Android, the segmented host now keeps one text fade animator per text view, as iOS does, so it can stop them.animationchanges no layout, so it isn't part of the measurement keys (iOSENRMStreamingRenderEqual, Android stream-update hash).Ending a stream: turning
streamingoff gives one unfiltered render, as before. The docs now say to do it.onStreamingEnd: called when the view stops streaming, oncestreamingturnsfalse. It fires once per stream, from where each host ends streaming, and not when the view unmounts mid-stream. iOS and Android only, likestreaming. Later in the stack it also fires when astreamends (#1151), and with smooth pacing only once the last words have appeared (#1159).Testing
Unit tests:
streamingandanimationreach the native view,animationdefaults to'fade',streamingAnimationalone arrives asstreaming, andstreaming={false}overridesstreamingAnimation.onStreamingEndreaches the callback.Devices: Release build on an iPhone 15 Pro (iOS 26.6.1). The 80 KB github "forest" and 66 KB commonmark "chat" streams from #1146 were each streamed three ways. A scratch counter logged the text tail fades started and the frames with an opacity animation on screen.
streamingAnimationstreamingstreaming,animation: 'none'streamingAnimationstreamingstreaming,animation: 'none'The old and new props behave the same.
'none'starts no fade, and every stream still shows every update and ends at the static height.onStreamingEnd, added later: iOS and Android build at this PR. At the top of the stack, checked with Argent on the iOS simulator and the Pixel 9 emulator: it fires once per stream in both flavors, with smooth pacing on and off, and when smooth is turned off during the final reveal.On a Pixel 9 emulator (Android 16, Release build), the github forest stream through the deprecated
streamingAnimation(sent to native asstreaming) ends at 75,660.58, the same height as mounting the document in one go.Docs
docs-mddescribestreaming, the deprecated alias andanimation.streamingConfigonly works withflavor="github"; it works in both flavors.onStreamingEndhas its reference entry and a line in the guide's Reference list.check-examples,check-llmsandyarn buildpass.Changes after review
react-native-streamdownis deprecated: this package holds back incomplete blocks and repairs half-written syntax natively.streamingAnimationlogs a one-time development warning pointing tostreaming. While it is on it also holds back incomplete blocks and repairs syntax, so turn it off when the stream ends. Migration notes are in both streaming guides,BREAKING_CHANGES.mdand the README.onStreamingEndwhenstreamingturns off.streaming.Checked on the whole stack after these changes: core suite and fuzzing, Jest (1,838), Android unit tests (134), iOS unit tests (118), ktlint; streams on an iPhone 15 Pro and a Galaxy A16 call
onStreamingEndonce and end at the static height, with CPU level or lower; the 106 Maestro flows give the same results and screenshots as before.PR Checklist
🤖 Generated with Claude Code