You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
useTheme(overrides) and withTheme concatenate arrays, so an easing override is ignored #5311
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?
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.
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
Activity