2

I know theres a lot of similar questions/answers about Fast Refresh being broken. Mine's a little different I believe. I can point to the line that causing it to be broken, and I'm trying to understand why.

Package.js:

"react": "^18",
"react-native": "0.70.3",
"@react-navigation/bottom-tabs": "^6.4.0",
"@react-navigation/elements": "^1.3.6",
"@react-navigation/native": "^6.0.13",
"@react-navigation/stack": "^6.3.2",

In the app we have three layers navigation stacks (using react-navigation)

• Parent Stack Navigator 
  • Authenticated Stack < Problem is here
    • Tab Navigator
      • All other stacks

useState() or some form of state management exists in all three of the stack/tab navigators. and fast refresh is currently broken. However, if I remove ALL of the useState() calls from the Authenticated Stack then fast refresh works throughout the app as expected.

I've go so far as to delete all state calls except for the one below, AND it's not even referenced in the file and its still causing fast refresh to be broken. If I comment it out, everything works as expected.

const [isChatClientReady, setIsChatClientReady] = useState(false)

Has anyone experienced anything like this? Or have some advice on where to look?

Thanks!

James Dunay
  • 2,714
  • 8
  • 41
  • 66

0 Answers0