Gathering detailed insights and metrics for @react-spring/rafz
Gathering detailed insights and metrics for @react-spring/rafz
Gathering detailed insights and metrics for @react-spring/rafz
Gathering detailed insights and metrics for @react-spring/rafz
✌️ A spring physics based React animation library
npm install @react-spring/rafz
Typescript
Module System
Node Version
NPM Version
99.9
Supply Chain
99.4
Quality
83.5
Maintenance
100
Vulnerability
100
License
TypeScript (98.84%)
JavaScript (0.6%)
Shell (0.36%)
CSS (0.12%)
HTML (0.09%)
Total Downloads
190,526,163
Last Day
83,416
Last Week
2,025,669
Last Month
8,714,285
Last Year
79,396,532
MIT License
28,755 Stars
3,548 Commits
1,207 Forks
191 Watchers
12 Branches
202 Contributors
Updated on Jun 30, 2025
Minified
Minified + Gzipped
Latest Version
10.0.1
Package Id
@react-spring/rafz@10.0.1
Unpacked Size
32.40 kB
Size
6.66 kB
File Count
12
NPM Version
10.9.2
Node Version
22.14.0
Published on
May 21, 2025
Cumulative downloads
Total Downloads
Last Day
-19.3%
83,416
Compared to previous day
Last Week
-9.7%
2,025,669
Compared to previous week
Last Month
3.3%
8,714,285
Compared to previous month
Last Year
71.5%
79,396,532
Compared to previous year
No dependencies detected.
Coordinate requestAnimationFrame
calls across your app and/or libraries.
ReactDOM.unstable_batchedUpdates
)
1import { raf } from '@react-spring/rafz' 2 3// Schedule an update 4raf(dt => {}) 5 6// Start an update loop 7raf(dt => true) 8 9// Cancel an update 10raf.cancel(fn) 11 12// Schedule a mutation 13raf.write(() => {}) 14 15// Before any updates 16raf.onStart(() => {}) 17 18// Before any mutations 19raf.onFrame(() => {}) 20 21// After any mutations 22raf.onFinish(() => {}) 23 24// Set a timeout that runs on nearest frame 25raf.setTimeout(() => {}, 1000) 26 27// Use a polyfill 28raf.use(require('@essentials/raf').raf) 29 30// Get the current time 31raf.now() // => number 32 33// Set how you want to control raf firing 34raf.frameLoop = 'demand' | 'always'
update
phase is for updating JS state (eg: advancing an animation).write
phase is for updating native state (eg: mutating the DOM).write
phase.onFrame
phase.true
to run again next frame.raf.cancel
function only works with raf
handlers.raf.sync
to disable scheduling in its callback.raf.batchedUpdates
to avoid excessive re-rendering in React.
raf.throttle
Wrap a function to limit its execution to once per frame. If called more than once in a single frame, the last arguments are used.
1let log = raf.throttle(console.log) 2 3log(1) 4log(2) // nothing logged yet 5 6raf.onStart(() => { 7 // "2" is logged by now 8}) 9 10// Cancel a pending call. 11log.cancel() 12 13// Access the wrapped function. 14log.handler
No vulnerabilities found.
Reason
10 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 7/20 approved changesets -- score normalized to 3
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
51 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More