You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor!: remove deprecated targets and the `react-spring` umbrella
6
+
7
+
Removes the deprecated `@react-spring/native`, `@react-spring/konva`, and `@react-spring/zdog` targets (along with the React Native hook variants), plus the `react-spring` umbrella package. Install a target directly — `@react-spring/web` or `@react-spring/three`.
8
+
9
+
For React Native, use [Reanimated](https://docs.swmansion.com/react-native-reanimated/) — its springs run on the UI thread, unlike react-spring's JS-thread engine.
Copy file name to clipboardExpand all lines: CLAUDE.md
+5-9Lines changed: 5 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,15 +39,12 @@ Strict isolation: `node_modules` is non-hoisted, so a workspace can only `import
39
39
40
40
## Architecture
41
41
42
-
The library is a layered monorepo. Read packages bottom-up — each layer is target-agnostic until you reach `targets/*`.
42
+
The library is a layered monorepo. Read packages bottom-up — each layer is target-agnostic until you reach `targets/*`. There is no umbrella package: consumers install a target directly (`@react-spring/web` or `@react-spring/three`).
@@ -68,9 +65,8 @@ The library is a layered monorepo. Read packages bottom-up — each layer is tar
68
65
-`applyAnimatedValues(node, props)` — push the latest values to the platform's native node.
69
66
-`createAnimatedStyle(style)` — wrap the `style` prop.
70
67
-`getComponentProps(props)` — filter props before forwarding (e.g. web drops `scrollTop`/`scrollLeft`).
71
-
-**`@react-spring/core`** — platform-agnostic spring engine. `SpringValue` (single animated value), `Controller` (group of springs), `SpringRef` (imperative handle), `Interpolation`. Public hooks/components live under `src/hooks` and `src/components`. Hooks with native variants ship a `.native.ts` sibling (`useInView.native.ts`, `useResize.native.ts`, `useScroll.native.ts`) that React Native picks up via Metro's platform extensions.
68
+
-**`@react-spring/core`** — platform-agnostic spring engine. `SpringValue` (single animated value), `Controller` (group of springs), `SpringRef` (imperative handle), `Interpolation`. Public hooks/components live under `src/hooks` and `src/components`.
72
69
-**Targets** — thin adapters. Each `targets/<name>/src/index.ts` follows the same template: `Globals.assign(...)`, define `primitives`, build a host via `createHost(primitives, { applyAnimatedValues, ... })`, then `export const animated = host.animated` and `export * from '@react-spring/core'`. To add an `animated.X` shorthand for a new element, add it to that target's `primitives.ts`.
73
-
-**`react-spring`** (umbrella) — depends on every target and only re-exports. Don't add logic here.
74
70
-**`@react-spring/parallax`** — extra component layered on `@react-spring/web`. Its `test/` folder is the Vite app the E2E project serves and drives (`tests/e2e/parallax.spec.ts`).
<img src="https://img.shields.io/discord/740090768164651008?style=flat&colorA=000000&colorB=000000&label=discord&logo=discord&logoColor=ffffff" alt="Chat on Discord">
@@ -42,7 +42,7 @@ const styles = useSpring({
42
42
43
43
Just a small bit about us:
44
44
45
-
-**Cross-Platform**: We support `react-dom`, `react-native`,`react-three-fiber`, `react-konva` & `react-zdog`.
45
+
-**Cross-Platform**: We support `react-dom` and`react-three-fiber`.
46
46
-**Versatile**: Be declarative with your animations or if you prefer, imperative.
47
47
-**Spring-Physics First**: By default animation use springs for fluid interactivity, but we support durations with easings as well.
48
48
@@ -53,10 +53,10 @@ There's a lot more to be had! Give it a try and find out.
53
53
### ⚡️ Jump Start
54
54
55
55
```shell
56
-
# Install the entire library
57
-
npm install react-spring
58
-
# or just install your specific target (recommended)
0 commit comments