@zag-js/react
Advanced tools
Comparing version 1.2.1 to 1.3.0
import { MachineSchema, Machine, Service } from '@zag-js/core'; | ||
export { mergeProps } from '@zag-js/core'; | ||
import * as _zag_js_types from '@zag-js/types'; | ||
import { HTMLAttributes, CSSProperties, JSX, RefObject, PropsWithChildren } from 'react'; | ||
import { JSX, HTMLAttributes, CSSProperties, RefObject, PropsWithChildren } from 'react'; | ||
@@ -6,0 +6,0 @@ declare function useMachine<T extends MachineSchema>(machine: Machine<T>, userProps?: Partial<T["props"]>): Service<T>; |
@@ -38,3 +38,3 @@ "use client"; | ||
const initial = props().value ?? props().defaultValue; | ||
const eq = props().isEqual ?? utils.isEqual; | ||
const eq = props().isEqual ?? Object.is; | ||
const [initialValue] = React.useState(initial); | ||
@@ -297,2 +297,4 @@ const [value, setValue] = React.useState(initialValue); | ||
reactDom.flushSync(() => state.set(target)); | ||
} else if (transition.reenter && !changed) { | ||
state.invoke(currentState, currentState); | ||
} else { | ||
@@ -299,0 +301,0 @@ action(transition.actions ?? []); |
{ | ||
"name": "@zag-js/react", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "The react wrapper for zag", | ||
@@ -28,6 +28,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/core": "1.2.1", | ||
"@zag-js/store": "1.2.1", | ||
"@zag-js/types": "1.2.1", | ||
"@zag-js/utils": "1.2.1" | ||
"@zag-js/core": "1.3.0", | ||
"@zag-js/store": "1.3.0", | ||
"@zag-js/types": "1.3.0", | ||
"@zag-js/utils": "1.3.0" | ||
}, | ||
@@ -34,0 +34,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
24224
676
+ Added@zag-js/core@1.3.0(transitive)
+ Added@zag-js/dom-query@1.3.0(transitive)
+ Added@zag-js/store@1.3.0(transitive)
+ Added@zag-js/types@1.3.0(transitive)
+ Added@zag-js/utils@1.3.0(transitive)
- Removed@zag-js/core@1.2.1(transitive)
- Removed@zag-js/dom-query@1.2.1(transitive)
- Removed@zag-js/store@1.2.1(transitive)
- Removed@zag-js/types@1.2.1(transitive)
- Removed@zag-js/utils@1.2.1(transitive)
Updated@zag-js/core@1.3.0
Updated@zag-js/store@1.3.0
Updated@zag-js/types@1.3.0
Updated@zag-js/utils@1.3.0