New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@xstate/react

Package Overview
Dependencies
Maintainers
3
Versions
81
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-beta.9 to 4.0.0-beta.10

3

dist/declarations/src/useMachine.d.ts
import { ActorRefFrom, AnyStateMachine, AreAllImplementationsAssumedToBeProvided, ActorOptions, MissingImplementationsError, StateFrom } from 'xstate';
/**
*
* @deprecated Use `useActor(...)` instead.
* @alias useActor
*/

@@ -6,0 +5,0 @@ export declare function useMachine<TMachine extends AnyStateMachine>(machine: AreAllImplementationsAssumedToBeProvided<TMachine['__TResolvedTypesMeta']> extends true ? TMachine : MissingImplementationsError<TMachine['__TResolvedTypesMeta']>, options?: ActorOptions<TMachine>): [

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

var useIsomorphicLayoutEffect = require('use-isomorphic-layout-effect');
require('xstate/actors');
var withSelector = require('use-sync-external-store/shim/with-selector');

@@ -181,4 +180,3 @@

/**
*
* @deprecated Use `useActor(...)` instead.
* @alias useActor
*/

@@ -185,0 +183,0 @@ function useMachine(machine, options = {}) {

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

var useIsomorphicLayoutEffect = require('use-isomorphic-layout-effect');
var actors = require('xstate/actors');
var withSelector = require('use-sync-external-store/shim/with-selector');

@@ -86,3 +85,3 @@

function useActor(logic, options = {}) {
if (actors.isActorRef(logic)) {
if (!!logic && 'send' in logic && typeof logic.send === 'function') {
throw new Error(`useActor() expects actor logic (e.g. a machine), but received an ActorRef. Use the useSelector(actorRef, ...) hook instead to read the ActorRef's snapshot.`);

@@ -191,4 +190,3 @@ }

/**
*
* @deprecated Use `useActor(...)` instead.
* @alias useActor
*/

@@ -195,0 +193,0 @@ function useMachine(machine, options = {}) {

@@ -6,3 +6,2 @@ import * as React from 'react';

import useIsomorphicLayoutEffect from 'use-isomorphic-layout-effect';
import { isActorRef } from 'xstate/actors';
import { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector';

@@ -60,3 +59,3 @@

function useActor(logic, options = {}) {
if (isActorRef(logic)) {
if (!!logic && 'send' in logic && typeof logic.send === 'function') {
throw new Error(`useActor() expects actor logic (e.g. a machine), but received an ActorRef. Use the useSelector(actorRef, ...) hook instead to read the ActorRef's snapshot.`);

@@ -165,4 +164,3 @@ }

/**
*
* @deprecated Use `useActor(...)` instead.
* @alias useActor
*/

@@ -169,0 +167,0 @@ function useMachine(machine, options = {}) {

@@ -6,3 +6,2 @@ import * as React from 'react';

import useIsomorphicLayoutEffect from 'use-isomorphic-layout-effect';
import 'xstate/actors';
import { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector';

@@ -155,4 +154,3 @@

/**
*
* @deprecated Use `useActor(...)` instead.
* @alias useActor
*/

@@ -159,0 +157,0 @@ function useMachine(machine, options = {}) {

{
"name": "@xstate/react",
"version": "4.0.0-beta.9",
"version": "4.0.0-beta.10",
"description": "XState tools for React",

@@ -58,3 +58,3 @@ "keywords": [

"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"xstate": "^5.0.0-beta.28"
"xstate": "^5.0.0-beta.29"
},

@@ -80,4 +80,4 @@ "peerDependenciesMeta": {

"react-dom": "^18.0.0",
"xstate": "5.0.0-beta.28"
"xstate": "5.0.0-beta.29"
}
}
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