Skip to content
Source
Sign inSign up
TanStack/hotkeys

feat(solid-hotkeys): support Solid 2 #213

Openryansolid(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/213/headopened

Showing 80 changed files with 17 additions and 1 deletion (loading 76).

x
0 of 80 viewed, 80 left
4 additions and 0 deletions.changeset/pre.jsonAdded
View file
@@ -0,0 +1,4 @@
+{
+ "mode": "pre",
+ "tag": "alpha"
+}
12 additions and 0 deletions.changeset/solid-hotkeys-solid-2.mdAdded
View file
@@ -0,0 +1,12 @@
+---
+'@tanstack/solid-hotkeys': major
+---
+​
+Support Solid 2. `@tanstack/solid-hotkeys` now requires `solid-js` 2 (`>=2.0.0-rc.20 <3.0.0`); stay on 1.x for Solid 1.
+​
+- The primitives keep their API. Reactive options are tracked by split effects (compute reads the options, the effect applies them), `HotkeysProvider` publishes its store in `onSettled`, and provider props read once at creation are read untracked.
+- `HotkeysProvider` renders the Solid 2 context without JSX, so the adapter depends on `solid-js` only.
+- The internal store selector writes with `ownedWrite`, since store updates arrive from outside the owner.
+- `createHotkeyRegistrations` returns a store reconciled by registration `id`, so `<For>` rows keep their identity when registrations change.
+- As with every Solid 2 signal, values read right after a write outside a reactive scope update after the next flush (`flush()` from `solid-js`, or the next microtask).
+- `@tanstack/solid-hotkeys-devtools` stays on Solid 1 until TanStack Devtools has a Solid 2 entry.
1 addition and 1 deletion.github/workflows/release.ymlModified
View file
@@ -2,7 +2,7 @@
​
on:
push:
- branches: [main, alpha, beta, rc]
+ branches: [main, alpha, beta, rc, '*-pre']
​
concurrency: