Skip to content

docs(react-native): add AIO vs classic comparison and migration guide [SDC-33130] - #433

Open
konradgapinski wants to merge 2 commits into
mainfrom
feature/SDC-33130
Open

docs(react-native): add AIO vs classic comparison and migration guide [SDC-33130]#433
konradgapinski wants to merge 2 commits into
mainfrom
feature/SDC-33130

Conversation

@konradgapinski

Copy link
Copy Markdown
Contributor

Adds docs/sdks/react-native/aio/vs-classic.md — a comparison of the React Native
AIO components against the classic mode-plus-view API, plus a migration section.

Jira: SDC-33130

What's in it

  • Side-by-side comparison of each AIO view against its classic equivalent —
    what you write, what the AIO view does for you, and where the prop surfaces differ.
  • Migration walkthrough for two modes, BarcodeCapture and LabelCapture, plus a
    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.
  • Sidebar entry under the AIO Components category.

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.tsx in data-capture-sdk — not written from API
signatures. That matters here because several of the call sequences are not
guessable from the types: BarcodeArView needs an explicit view.start() or it
renders a preview that never scans, BarcodeCountView takes its listeners through
the ref rather than as props, and IdCaptureAioView uses didCaptureId/didRejectId
rather than didScan.

Merge conflict to expect

sidebars.ts will conflict with #432 — both branches add the same AIO Components
category at the same line. Resolve by unioning the two items arrays; neither side
is wrong.

Verification

  • node scripts/docs-gate/index.cjs — 1 doc checked, 0 errors, 0 warnings (frontmatter, links, cspell, Vale).
  • npx docusaurus build — clean. onBrokenLinks and onBrokenAnchors are both throw,
    so a green build is also the link and anchor check.
  • Page rendered and read locally at /next/sdks/react-native/aio/vs-classic/.

… [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>
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

🚀 View preview at
https://Scandit.github.io/data-capture-documentation/pr-preview/pr-433/

Built to branch gh-pages at 2026-08-28 09:46 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

… [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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants