Skip to content

react-supergrain: update to @supergrain/kernel 7.3.0 - #1

Merged
scottmessinger merged 1 commit into
add-supergrainfrom
update-supergrain-kernel-7.3.0
Jul 28, 2026
Merged

react-supergrain: update to @supergrain/kernel 7.3.0#1
scottmessinger merged 1 commit into
add-supergrainfrom
update-supergrain-kernel-7.3.0

Conversation

@scottmessinger

Copy link
Copy Markdown
Member

Refreshes the submission to the current library and app. Base is add-supergrain so this stays entirely within this fork — nothing here touches upstream.

Changes (3 files in frameworks/keyed/react-supergrain/)

  • package.json@supergrain/core + @supergrain/react 2.0.1 → @supergrain/kernel 7.3.0 (single package, /react entrypoint); React 19.0.0 → 19.2.4; Vite 6 → 8, plugin-react 4 → 6. customURL: "/dist" and the js-framework-benchmark section unchanged.
  • src/main.tsx — rewritten to the current recommended patterns: createReactive store, tracked() rows, parent-ref For (direct DOM moves on swap), selection state on item.selected, tbody keyed by an epoch bumped on run/clear. No test instrumentation, matching the previous submission's style.
  • package-lock.json — regenerated with npm against the published packages.

index.html, tsconfig.json, vite.config.ts unchanged.

Verification

  • npm install && npm run build-prod against the published @supergrain/kernel@7.3.0 (no workspace links): clean build, 206 KB minified bundle.
  • The built dist passes the supergrain repo's isKeyed-mirror suite — 6/6 applicable tests (page load, 1000-row DOM structure, keyed swap/replace/remove, select highlight).

Context

Kernel 7.3.0 carries the changes measured in supergrain#136: −21% weighted total vs the previous mainline on CI (create-10k −26%, select −26%, clear −14%, nothing slower), on top of the earlier app rework. The published table's 413.7 ms create-10k was measured on kernel 2.0.1.

🤖 Generated with Claude Code

The library was restructured since the last submission (2.0.1's @supergrain/core + @supergrain/react merged into @supergrain/kernel with a /react entrypoint). App updated to the currently recommended patterns: per-item selection state, parent-ref For (direct DOM moves on swap), and a keyed tbody for wholesale rebuilds. React 19.2.4, Vite 8.
Copilot AI review requested due to automatic review settings July 28, 2026 03:51
@scottmessinger
scottmessinger merged commit 6cd038c into add-supergrain Jul 28, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the react-supergrain keyed benchmark implementation to the newer @supergrain/kernel@7.3.0 API and modernizes the app code accordingly, keeping changes scoped to frameworks/keyed/react-supergrain/.

Changes:

  • Replaces @supergrain/core + @supergrain/react with @supergrain/kernel@7.3.0, and updates React / Vite / TypeScript versions.
  • Reworks src/main.tsx to use createReactive + tracked() rows, per-row selection state, and an epoch-keyed <tbody> strategy.
  • Regenerates package-lock.json for the new dependency graph.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
frameworks/keyed/react-supergrain/src/main.tsx Refactors the benchmark app to the current Supergrain Kernel patterns (reactive store, tracked rows, selection on row model, keyed tbody epoch).
frameworks/keyed/react-supergrain/package.json Updates runtime/dev dependencies to the new Kernel package plus newer React/Vite/TypeScript versions.
frameworks/keyed/react-supergrain/package-lock.json Lockfile regenerated to match the updated dependencies (includes new engine constraints from Vite/plugin-react).
Files not reviewed (1)
  • frameworks/keyed/react-supergrain/package-lock.json: Generated file
Comments suppressed due to low confidence (1)

frameworks/keyed/react-supergrain/package.json:22

  • This implementation stores selection state on each row (item.selected), which corresponds to Note krausest#800 (“View state on the model”). To keep benchmark metadata consistent with other frameworks that use this optimization (e.g. frameworks/non-keyed/san/package.json), add issue 800 to the js-framework-benchmark metadata.
  "js-framework-benchmark": {
    "frameworkVersionFromPackage": "react",
    "frameworkHomeURL": "https://github.com/commoncurriculum/supergrain",
    "customURL": "/dist"
  }

Comment on lines +14 to +16
"@vitejs/plugin-react": "6.0.2",
"typescript": "5.9.2",
"vite": "8.0.16"
scottmessinger pushed a commit that referenced this pull request Jul 28, 2026
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