Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React native component wont update when remote debug

Before Im posting this question, I've tried to look up for answers on google but I could not find the solution to this problem.

I'm developing a react native application, I use redux and react native debugger to check my console and my state.

The issue that I am facing right now is my application wont update to latest changes when expo is debugging the application remotely using React Native Debugger.

Lets say I have a main screen with text "Hello World" and I change my code to "Hello Me", and when I refresh the expo/app, it is still Hello World. I've tried to reset cache, delete expo, recompile but nothing works. I have to disable remote debugging in expo in order to see any changes related to my code.

Does anyone have any idea how to solve this ?

like image 440
Haziq Avatar asked Jan 02 '20 13:01

Haziq


1 Answers

The issue is with React Native Debugger. There is a bug that is likely related to React Native 0.61 and the "fast refresh" feature that is causing the debugger to load stale JS code.

To fix the issue click on the "Network" tab in the debugger and check the "disable cache" option. Now you should see your changes work.

For more info check this out:

https://github.com/jhen0409/react-native-debugger/issues/423

like image 198
Travis James Avatar answered Sep 28 '22 10:09

Travis James