@react-spring/core
Advanced tools
Comparing version 9.0.0-beta.26 to 9.0.0-beta.27
@@ -211,2 +211,11 @@ import { RefObject, ReactNode } from 'react'; | ||
/** | ||
* Imperative API for the useSprings hook, allowing to update individually or over the array | ||
* | ||
* The `T` parameter should only contain animated props. | ||
*/ | ||
interface SpringsUpdateFn<T extends object = {}> { | ||
/** Update the props of a spring */ | ||
(props: SpringUpdate<T> | SpringUpdate<T>[] | ((index: number, spring: Controller<T>) => SpringUpdate<T>)): void; | ||
} | ||
/** | ||
* An async function that can update or cancel the animations of a spring. | ||
@@ -396,3 +405,3 @@ * | ||
props: (i: number) => Props & UseSpringProps<Props> | ||
): [SpringValues<Props>[], SpringUpdateFn<PickAnimated<Props>>, SpringStopFn] | ||
): [SpringValues<Props>[], SpringsUpdateFn<PickAnimated<Props>>, SpringStopFn] | ||
@@ -399,0 +408,0 @@ declare function useSprings<Props extends object>( |
{ | ||
"name": "@react-spring/core", | ||
"version": "9.0.0-beta.26", | ||
"version": "9.0.0-beta.27", | ||
"description": "Cross-platform animation engine", | ||
@@ -34,4 +34,4 @@ "keywords": [ | ||
"@babel/runtime": "^7.3.1", | ||
"@react-spring/animated": "^9.0.0-beta.25", | ||
"@react-spring/shared": "^9.0.0-beta.25", | ||
"@react-spring/animated": "^9.0.0-beta.27", | ||
"@react-spring/shared": "^9.0.0-beta.27", | ||
"use-memo-one": "^1.1.0" | ||
@@ -38,0 +38,0 @@ }, |
@@ -63,2 +63,17 @@ import { Animatable, EasingFunction, SpringValue, RawValues } from '@react-spring/shared' | ||
/** | ||
* Imperative API for the useSprings hook, allowing to update individually or over the array | ||
* | ||
* The `T` parameter should only contain animated props. | ||
*/ | ||
export interface SpringsUpdateFn<T extends object = {}> { | ||
/** Update the props of a spring */ | ||
( | ||
props: | ||
| SpringUpdate<T> | ||
| SpringUpdate<T>[] | ||
| ((index: number, spring: Controller<T>) => SpringUpdate<T>) | ||
): void | ||
} | ||
/** | ||
* An async function that can update or cancel the animations of a spring. | ||
@@ -65,0 +80,0 @@ * |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
283889
5512