Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing Button Mode doesn't work dynamically (Expo 52) #4559

Open
dbrownstatsdraft opened this issue Nov 20, 2024 · 7 comments
Open

Changing Button Mode doesn't work dynamically (Expo 52) #4559

dbrownstatsdraft opened this issue Nov 20, 2024 · 7 comments
Labels

Comments

@dbrownstatsdraft
Copy link

Current behaviour

After upgrading to Expo 52 I can no longer change a button's mode attribute dynamically in iOS 18.1 simulator. Either programmatically or manually while developing. I must restart the app for the change to take effect when changing manually. It also appears that all styles are effected in this same way. If I update a style like margin it doesn't take effect until I either kill and restart the app or send a refresh signal via expo.

Expected behaviour

I should be able to change a Button's mode from "text" to "contained" and see the changes immediately in the app.

How to reproduce?

Create a new expo 52 app.
Create a react-native-paper (latest) button
Set button mode to "text"
Run in iOS 18.1 simulator
Change button mode to "contained" and save file
Look at button now. It will be in an in between state

Snack Link
Ensure Expo 52 and iOS or Android. Seems to work fine on Web but not iOS or Android.

Preview

Top button mode set to contained.
Image
After button press top button mode is set to text but wrapping container still has the fill color
Image

What have you tried so far?

Confirmed that downgrading expo to 51 works.

Your Environment

software version
ios 18.1
android latest
react-native 0.76.2
react-native-paper 5.12.5
node 22.11.0
npm or yarn 10.9.0
expo sdk 52.0.8
@raajnadar
Copy link
Collaborator

Are you using a new architecture? It seems the issue is in Expo or on the React Native side not the react native paper side problem.

@dbrownstatsdraft
Copy link
Author

Yes, new architecture.

@dbrownstatsdraft
Copy link
Author

I just updated app.json's newArchEnabled:false and I still see the issue.

@iM-GeeKy
Copy link

Potentially related to #4520. I've also added this to the list of new arch affected issues for visibility.

@K-E-L
Copy link

K-E-L commented Nov 26, 2024

I can confirm with @dbrownstatsdraft . I am seeing the issue with "newArchEnabled: false" and "newArchEnabled: true" on expo 52.0.11

@Crhist0
Copy link

Crhist0 commented Nov 29, 2024

following as I'm having the same issue with new expo projects

@ptrtdrv
Copy link

ptrtdrv commented Dec 13, 2024

Expo ~52.0.9. Same issue here. Button doesn't get rendered at all when its properties change. I have to force rendering it by changing 'key' attribute as a workaround. "newArchEnabled: false" and "newArchEnabled: true" don't make any difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants