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 property bag into nativeProperties (or onto a JSX element through an intermediate
object) allocates a brand new table every single render. Pointless garbage if the bag never changes.
This catches spreads where the source is a literal object or a module-level constant – anything that’s deterministic. Inline the properties directly on the element instead 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} />;