MCPcopy Index your code
hub / github.com/pmndrs/react-spring / createUpdate

Function createUpdate

packages/core/src/SpringValue.ts:1105–1118  ·  view source on GitHub ↗
(props: any)

Source from the content-addressed store, hash-verified

1103 * or `null` if all keys are affected.
1104 */
1105export function createUpdate(props: any) {
1106 const { to, from } = (props = inferTo(props))
1107
1108 // Collect the keys affected by this update.
1109 const keys = new Set<string>()
1110
1111 if (is.obj(to)) findDefined(to, keys)
1112 if (is.obj(from)) findDefined(from, keys)
1113
1114 // The "keys" prop helps in applying updates to affected keys only.
1115 props.keys = keys.size ? Array.from(keys) : null
1116
1117 return props
1118}
1119
1120/**
1121 * A modified version of `createUpdate` meant for declarative APIs.

Callers 4

updateMethod · 0.90
getSpringsFunction · 0.90
createLoopUpdateFunction · 0.85
declareUpdateFunction · 0.85

Calls 2

inferToFunction · 0.90
findDefinedFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…