Skip to content

inline style optimization #2861

@byteab

Description

@byteab

as I found most of the styles in react-native-paper are provided in an inline fashion.
doesn't it create extra re-renders and a performance issue?

for example

// https://github.com/callstack/react-native-paper/blob/main/src/components/Button.tsx
// Line:311
        <Text
            selectable={false}
            numberOfLines={1}
            style={[
              styles.label,
              compact && styles.compactLabel,
              uppercase && styles.uppercaseLabel,
              textStyle,
              font,
              labelStyle,
            ]}
          >
            {children}
          </Text>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions