docs(react-native): add AIO vs classic comparison and migration guide [SDC-33130] - #433
Open
konradgapinski wants to merge 2 commits into
Open
docs(react-native): add AIO vs classic comparison and migration guide [SDC-33130]#433konradgapinski wants to merge 2 commits into
konradgapinski wants to merge 2 commits into
Conversation
… [SDC-33130] Adds a page comparing the React Native AIO components with the classic mode-plus-view API, and a migration section walking BarcodeCapture and LabelCapture from classic to AIO. Every snippet is taken from in-repo DebugApp sample code rather than from API signatures, so the shown call sequences are ones that actually run. Sidebar entry goes under the AIO Components category, matching feature/SDC-33129. Both branches add that category block, so sidebars.ts conflicts on merge — resolve by unioning the items arrays. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
… [SDC-33130] Corrects one factual error and tightens the rest. The nested-provider paragraph claimed a nested ScanditProvider "sets them for that screen only", which contradicted its own next clause and is wrong: NestedScanditProvider applies its props to the same singleton camera, last writer wins, and nothing is reverted on unmount. Reworded to say that, with advice to set the values back when a later screen needs different ones. "Every AIO view exposes didScan" was also too strong — IdCaptureAioView has didCaptureId/didRejectId instead. Named the exception inline rather than leaving it to the note below. Also: added the AIO equivalent snippet where the text says the scaffolding moves into the component; linked the three public samples individually; put the provider explanation under its own heading and linked it from the camera section; moved the no-overlay caveat into a note; rewrote the ref example as a real component; and added a snippet to the migration checklist. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Adds
docs/sdks/react-native/aio/vs-classic.md— a comparison of the React NativeAIO components against the classic mode-plus-view API, plus a migration section.
Jira: SDC-33130
What's in it
what you write, what the AIO view does for you, and where the prop surfaces differ.
short paragraph pointing at the rest. Two worked examples rather than one per
mode, deliberately: the mechanical steps repeat and a reader only needs the shape.
AIO Componentscategory.How the snippets were sourced
Every code sample is lifted from sample code that runs in-repo —
DebugApp/app/samples/<Name>/and
DebugApp/app/ar/barcode-ar.tsxindata-capture-sdk— not written from APIsignatures. That matters here because several of the call sequences are not
guessable from the types:
BarcodeArViewneeds an explicitview.start()or itrenders a preview that never scans,
BarcodeCountViewtakes its listeners throughthe ref rather than as props, and
IdCaptureAioViewusesdidCaptureId/didRejectIdrather than
didScan.Merge conflict to expect
sidebars.tswill conflict with #432 — both branches add the sameAIO Componentscategory at the same line. Resolve by unioning the two
itemsarrays; neither sideis wrong.
Verification
node scripts/docs-gate/index.cjs— 1 doc checked, 0 errors, 0 warnings (frontmatter, links, cspell, Vale).npx docusaurus build— clean.onBrokenLinksandonBrokenAnchorsare boththrow,so a green build is also the link and anchor check.
/next/sdks/react-native/aio/vs-classic/.