The back button rotates on every re-render
Not rotating on every re-render
import { Appbar } from 'react-native-paper'
<Appbar.BackAction onPress={this._back} />

Looking in source code and I don't know why we are transforming things on default maybe remove this?
https://github.com/callstack/react-native-paper/blob/master/src/components/MaterialCommunityIcon.tsx#L94
Update with removing transform nothing changed still the same bug
| software | version
| --------------------- | -------
| ios/android/web | web
| react-native | 0.62.2
| react-native-paper | master
| react-native-vector-icons | master
| node | v14.3.0
| yarn | 1.22.4
| expo sdk | ejected from expo
| react-native-web | 0.13.1 (issue also on 0.11)
Couldn't find version numbers for the following packages in the issue:
react-native-paperreact-native-vector-iconsnpmexpoCan you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.
I'd suggest to inspect it in devtools to see which CSS is applying rotation.
Maybe it's done in the new React-native-web, it shows 2 div with each different transforms
Look like it's rendering the crossfadeicon, but I don't see that based on source code
The AppbarActions has the animated prop on the IconButton which render the CrossFadeIcon. The backactions uses that too
I don't think we should use the cross fade icon I think that use case was for before with the drawer menu changing into a rotating menu. But the drawer now overlaps the menu icon in the official
Animated = true
https://github.com/callstack/react-native-paper/blob/master/src/components/Appbar/AppbarAction.tsx#L99
Icon button renders CrossFadeIconButton
https://github.com/callstack/react-native-paper/blob/master/src/components/IconButton.tsx#L106
https://github.com/callstack/react-native-paper/blob/master/src/components/CrossFadeIcon.tsx
What is the use-case of the cross fade icon?
I think we just need to use React.useMemo there to ensure that it doesn't animate if it didn't change
I think that could fix it. But it's interesting maybe we don't need the CrossFadeIcon at all in the appbar and just disable the animated property.
(FWIW, this animation is still _great_ for changing a regular Appbar action on the right side)
Most helpful comment
(FWIW, this animation is still _great_ for changing a regular
Appbaraction on the right side)