Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xstate/react

Package Overview
Dependencies
Maintainers
3
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xstate/react - npm Package Compare versions

Comparing version 4.0.0-alpha.2 to 4.0.0-beta.3

9

fsm/dist/xstate-react-fsm.cjs.dev.js

@@ -18,9 +18,2 @@ 'use strict';

}
var getServiceState = function getServiceState(service) {
var currentValue;
service.subscribe(function (state) {
currentValue = state;
}).unsubscribe();
return currentValue;
};
function useMachine(stateMachine, options) {

@@ -76,3 +69,3 @@ var persistedStateRef = React.useRef();

var getSnapshot = React.useCallback(function () {
return getServiceState(service);
return service.state;
}, [service]);

@@ -79,0 +72,0 @@ var subscribe = React.useCallback(function (handleStoreChange) {

@@ -73,9 +73,2 @@ 'use strict';

}
var getServiceState = function getServiceState(service) {
var currentValue;
service.subscribe(function (state) {
currentValue = state;
}).unsubscribe();
return currentValue;
};
function useMachine(stateMachine, options) {

@@ -123,3 +116,3 @@ var persistedStateRef = React.useRef();

var getSnapshot = React.useCallback(function () {
return getServiceState(service);
return service.state;
}, [service]);

@@ -126,0 +119,0 @@ var subscribe = React.useCallback(function (handleStoreChange) {

@@ -10,9 +10,2 @@ import { _ as _slicedToArray, u as useConstant } from '../../dist/useConstant-0013a606.esm.js';

}
var getServiceState = function getServiceState(service) {
var currentValue;
service.subscribe(function (state) {
currentValue = state;
}).unsubscribe();
return currentValue;
};
function useMachine(stateMachine, options) {

@@ -68,3 +61,3 @@ var persistedStateRef = useRef();

var getSnapshot = useCallback(function () {
return getServiceState(service);
return service.state;
}, [service]);

@@ -71,0 +64,0 @@ var subscribe = useCallback(function (handleStoreChange) {

10

package.json
{
"name": "@xstate/react",
"version": "4.0.0-alpha.2",
"version": "4.0.0-beta.3",
"description": "XState tools for React",

@@ -46,5 +46,5 @@ "keywords": [

"peerDependencies": {
"@xstate/fsm": "^3.0.0-alpha.0",
"@xstate/fsm": "^3.0.0-beta.2",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"xstate": "^5.0.0-alpha.3"
"xstate": "^5.0.0-beta.7"
},

@@ -69,3 +69,3 @@ "peerDependenciesMeta": {

"@types/use-sync-external-store": "^0.0.3",
"@xstate/fsm": "3.0.0-alpha.0",
"@xstate/fsm": "3.0.0-beta.2",
"jsdom": "^14.0.0",

@@ -75,3 +75,3 @@ "jsdom-global": "^3.0.2",

"react-dom": "^18.0.0",
"xstate": "5.0.0-alpha.3"
"xstate": "5.0.0-beta.7"
},

@@ -78,0 +78,0 @@ "preconstruct": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc