noElementSpreadSpreading static property bag {{source}} through an intermediate object creates a new table every render. Inline the full object properties directly on the JSX element.small-rules/no-native-properties-spreadDisallow spreading static property bags into nativeProperties/*NativeProperties props and onto JSX elements via intermediate objects, because the spread creates a new copied table every render.
Spreading a static bag into nativeProperties, or onto a JSX tag through a temp object, builds a new table
on each render. Waste if the bag never changes.
This catches a spread from an object literal or a module-level constant, the kind that won’t change. Put the fields on the tag and skip the copy.
noElementSpreadSpreading static property bag {{source}} through an intermediate object creates a new table every render. Inline the full object properties directly on the JSX element.noNativePropertiesSpreadSpreading static property bag {{source}} into {{prop}} creates a new table every render. Pass it directly or inline the full object instead.This rule does not accept options.
const SOME_CONSTANT = {};const view = <Frame nativeProperties={{ ...SOME_CONSTANT, Text: "hello" }} />;const view = <Frame nativeProperties={SOME_CONSTANT} />;