Skip to content

docs: add the snack demo and document its upkeep - #14

Merged
JoshuaPariona merged 1 commit into
mainfrom
chore/snack-demo
Sep 24, 2026
Merged

JoshuaPariona merged 1 commit into
mainfrom
chore/snack-demo

Conversation

@JoshuaPariona

Copy link
Copy Markdown
Collaborator

Summary

Adds snack/, the source of the published
Expo Snack, and links
it from the README so the module can be tried from a browser or Expo Go with
nothing installed. The Snack exists because 1.1.0 made the native module
optional: react-native-webview already ships inside Expo Go, so the view runs
there.

The demo is deliberately small next to example/ — one screen, one document,
four highlighters — and it is what the README, the React Native Directory entry
and future answers point at.

Why the source lives in the repo: Snack has no git integration to rely on, so
the folder is the reviewed, formatted, versioned copy and the Snack is a mirror
of it. snack/README.md carries the procedure, and docs/VERSION-UPDATE.md
now lists snack/package.json among the places a release has to touch —
a stale pin there demos an older library than the one people install.

Also here:

  • react-native-libraries-entry.json, our React Native Directory entry, now
    documented in CONTRIBUTING.md (the live copy lives in that project's repo;
    this is the local original). It is already open as
    react-native-community/directory#2828.
  • yarn lint now covers snack/ too: the ESLint config always matched those
    files, but expo-module lint only ever passed src to ESLint.
  • docs/VERSION-UPDATE.md gained the cosmetic references and the other version
    strings that drift the same way — the react-native-webview range duplicated
    in four places, and the vendored rangy@1.3.2 directory name that appears in
    nine.

Type of change

  • fix — bug fix (no public API change)
  • feat — new backward-compatible API
  • Breaking change to the public API or the RN ↔ WebView bridge contract
  • docs / chore / ci / test — no runtime change

Nothing under src/, ios/ or android/ is touched, and snack/ stays out of
the published package: files in package.json is a whitelist, so
npm pack --dry-run ships zero files from it.

How was this tested?

yarn lint (now including the five files in snack/), yarn typecheck and
yarn test (151 tests) pass.

The demo itself was run on Android through a prebuilt app that installs the
published 1.1.0 from npm: select a passage, apply a highlighter from the native
menu, clear everything, then undo — the highlights come back from the
serialized payload, and the undo button disables itself when the history runs
out.

  • Android (full interaction loop)
  • iOS — not exercised by hand; the simulator takes no input from the CLI
    without accessibility permission

Checklist

  • yarn lint, yarn typecheck, and yarn test all pass.
  • Public API changes are documented — there are none.
  • Bridge changes keep all three sides in sync — no bridge change here.
  • CHANGELOG.md updated under ## [Unreleased] — not applicable: no
    runtime change ships to consumers from this PR.
  • I did not bump the version.

@JoshuaPariona
JoshuaPariona merged commit 7be628f into main Sep 24, 2026
1 of 3 checks passed
@JoshuaPariona
JoshuaPariona deleted the chore/snack-demo branch September 24, 2026 03:34
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.

1 participant