MCPcopy Index your code
hub / github.com/react/react / applyShapeProps

Function applyShapeProps

packages/react-art/src/ReactFiberConfigART.js:214–233  ·  view source on GitHub ↗
(instance, props, prevProps = {})

Source from the content-addressed store, hash-verified

212}
213
214function applyShapeProps(instance, props, prevProps = {}) {
215 applyRenderableNodeProps(instance, props, prevProps);
216
217 const path = props.d || childrenAsString(props.children);
218
219 const prevDelta = instance._prevDelta;
220 const prevPath = instance._prevPath;
221
222 if (
223 path !== prevPath ||
224 path.delta !== prevDelta ||
225 prevProps.height !== props.height ||
226 prevProps.width !== props.width
227 ) {
228 instance.draw(path, props.width, props.height);
229
230 instance._prevDelta = path.delta;
231 instance._prevPath = path;
232 }
233}
234
235function applyTextProps(instance, props, prevProps = {}) {
236 applyRenderableNodeProps(instance, props, prevProps);

Callers

nothing calls this directly

Calls 3

childrenAsStringFunction · 0.90
applyRenderableNodePropsFunction · 0.85
drawMethod · 0.45

Tested by

no test coverage detected