HomePhabricator
Diffusion Comm 67e4e8655154

[native] [fix] [ENG-1078] fix hot reload loosing state

Description

[native] [fix] [ENG-1078] fix hot reload loosing state

Summary:
fix for https://linear.app/comm/issue/ENG-1078/chat-view-loses-state-during-fast-refresh. Additionally, the reason this works is because https://reactnative.dev/docs/fast-refresh#how-it-works which is why we remove the additional exports from InlineSidebar and moved them into a new file.

If you edit a module with exports that aren't React components, Fast Refresh will re-run both that module, and the other modules importing it. So if both Button.js and Modal.js import Theme.js, editing Theme.js will update both components.

Test Plan: follow steps in issue. 1. update inline-sidebar.react in native, have the chatview (conversation) open, hot-reload should not navigate you away from the screen that you were currently on.

Reviewers: atul, ashoat

Reviewed By: ashoat

Subscribers: palys-swm, Adrian, karol-bisztyga, yayabosh

Differential Revision: https://phabricator.ashoat.com/D3901

Details

Provenance
benschacAuthored on May 3 2022, 1:58 PM
Reviewer
ashoat
Differential Revision
D3901: [native] [fix] [ENG-1078] fix hot reload loosing state
Parents
rCOMM0637428a5235: [native] [fix] [ENG-1077] fix reloading bug in tab navigation
Branches
Unknown
Tags
Unknown