question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Appbar.Action custom Icon rotates on rerender

See original GitHub issue

Current behaviour

When the Appbar.Action re-renders and is being passed a custom icon it adds a small 90-degree rotation on rerendering.

Expected behaviour

I expect the image to remain still like it does if I pass a string icon name for it to use.

Code sample

https://snack.expo.io/@domosafety/mature-apples

What have you tried

Identified the issue by removing the use of Appbar.Action and using a plane View and the issue is not present. I have also used a named icon in place of a custom icon and again the issue does not appear.

This issue also only presents its self in react-native-paper version >= 3.11.0

Your Environment

software version
ios or android 10
react-native 0.63.3
react-native-paper 4.2.0
node v12.2.0
npm 6.14.8
expo 39.0.0 (but that’s just in the snack, I don’t use expo on my actual project)
react-native-vector-icons 7.1.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

16reactions
JaeWangLcommented, Nov 17, 2020

I had same issue My solution was just adding ‘animated={false}’ for svg file like

            <Appbar.Action
                icon={() => <ProfileIcon width={18} height={19} />}
                color='white'
                animated={false}
                onPress={onPersonPress}
            />
1reaction
leighquincecommented, Nov 4, 2020

This issue is still present in the latest release 4.3.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-admin: how to hide refresh button from AppBar?
I know you could customize the actions with 'actions' prop on List component, but this seems to be outdated since the Refresh button...
Read more >
Icons · React Native Paper - Open Source
Configuring icons. Many of the components require the react-native-vector-icons library to render correctly. If you're using Expo, ... Use custom icons.
Read more >
Visualize a "reset" functionality in a toolbar icon [closed]
We want to add a toolbar button that allows the user to bring the model back to the original position, scale and rotation....
Read more >
[solved] toolbar button rotation? custom NaviCube? - Page 2
I don't know what to do, because from user perspective the icons ... model rotation I should probably have to run "register" this...
Read more >
Progress indicators - Status - Human Interface Guidelines
When you use a progress bar in a navigation bar or toolbar — for example, ... Spinning indicators, also known as spinners, show...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found