Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reloading react native app in code

Tags:

react-native

My use case is to reload the app on the click on a button so that a lot of properties can be redefined after that click. Is there a way we can reload a react native app via code?

Thanks!

like image 880
pagarwal Avatar asked Mar 31 '26 08:03

pagarwal


1 Answers

This is a huge workaround – but it is saving a lot of time and avoiding the frustration of not shaking correctly.

We just throw 'Want to reload? to prompt the error screen while in development, so we can hit refresh.

EDIT: If you want only to "reload" a button and its properties, you only need to rerender the parent component (if props are what you want to change), else, just change the state of the components, following normal react development.

like image 59
jsdario Avatar answered Apr 02 '26 21:04

jsdario