Skip to content

useTheme(overrides) and withTheme concatenate arrays, so an easing override is ignored #5311

Backlog

Description

@Doberjohn

Current behaviour

useTheme(overrides) and withTheme merge an override into the theme by concatenating arrays. An easing override, useTheme({ motion: { easing: { standard: [0.2, 0, 0, 1] } } }), gives theme.motion.easing.standard 8 numbers, the default curve followed by the override. Easing reads the first four, so the override has no effect. ThemeProvider, PaperProvider and a component's theme prop replace the array instead. 6.0.0-alpha.3 does the same.

Expected behaviour

useTheme(overrides) and withTheme replace arrays, as the providers and the theme prop do.

How to reproduce?

  1. In a component inside PaperProvider, call useTheme({ motion: { easing: { standard: [0.2, 0, 0, 1] } } }), or wrap a component with withTheme and pass it the same theme.
  2. Read theme.motion.easing.standard.

Your Environment

software version
react-native-paper 6.0.0-alpha.4 (main at 7ab2640), and 6.0.0-alpha.3
tested in Jest

Activity

  1. added this to the 6.1.0 milestone on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions