Gathering detailed insights and metrics for @xstate/react
Gathering detailed insights and metrics for @xstate/react
Gathering detailed insights and metrics for @xstate/react
Gathering detailed insights and metrics for @xstate/react
Actor-based state management & orchestration for complex app logic.
npm install @xstate/react
Typescript
Module System
Node Version
NPM Version
97.2
Supply Chain
83
Quality
91
Maintenance
100
Vulnerability
100
License
@xstate/store@3.8.0
Updated on Jun 29, 2025
@xstate/store@3.7.1
Updated on Jun 26, 2025
@xstate/store@3.7.0
Updated on Jun 21, 2025
@xstate/react@6.0.0
Updated on Jun 19, 2025
@xstate/vue@5.0.0
Updated on Jun 19, 2025
@xstate/svelte@5.0.0
Updated on Jun 19, 2025
TypeScript (97.98%)
Vue (0.78%)
JavaScript (0.48%)
Svelte (0.42%)
CSS (0.26%)
HTML (0.08%)
Total Downloads
128,200,408
Last Day
46,036
Last Week
1,144,940
Last Month
4,868,443
Last Year
47,700,821
MIT License
28,420 Stars
6,806 Commits
1,315 Forks
191 Watchers
296 Branches
346 Contributors
Updated on Jul 04, 2025
Minified
Minified + Gzipped
Latest Version
6.0.0
Package Id
@xstate/react@6.0.0
Unpacked Size
35.38 kB
Size
6.10 kB
File Count
18
NPM Version
10.9.2
Node Version
22.16.0
Published on
Jun 19, 2025
Cumulative downloads
Total Downloads
2
This package contains utilities for using XState with React.
xstate
and @xstate/react
:1npm i xstate @xstate/react
useMachine
hook:1import { useMachine } from '@xstate/react'; 2import { createMachine } from 'xstate'; 3 4const toggleMachine = createMachine({ 5 id: 'toggle', 6 initial: 'inactive', 7 states: { 8 inactive: { 9 on: { TOGGLE: 'active' } 10 }, 11 active: { 12 on: { TOGGLE: 'inactive' } 13 } 14 } 15}); 16 17export const Toggler = () => { 18 const [state, send] = useMachine(toggleMachine); 19 20 return ( 21 <button onClick={() => send({ type: 'TOGGLE' })}> 22 {state.value === 'inactive' 23 ? 'Click to activate' 24 : 'Active! Click to deactivate'} 25 </button> 26 ); 27};
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
30 commit(s) and 9 issue activity found in the last 90 days -- score normalized to 10
Reason
GitHub workflow tokens follow principle of least privilege
Details
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 17/20 approved changesets -- score normalized to 8
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
101 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 MoreLast Day
-6.9%
46,036
Compared to previous day
Last Week
-8.6%
1,144,940
Compared to previous week
Last Month
3.1%
4,868,443
Compared to previous month
Last Year
31.6%
47,700,821
Compared to previous year