Page MenuHomePhabricator

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

Authored by benschac on May 3 2022, 2:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 1:56 AM
Unknown Object (File)
Wed, Oct 9, 3:50 PM
Unknown Object (File)
Oct 4 2024, 8:09 PM
Unknown Object (File)
Oct 4 2024, 2:43 AM
Unknown Object (File)
Oct 3 2024, 8:56 PM
Unknown Object (File)
Oct 3 2024, 10:07 AM
Unknown Object (File)
Sep 15 2024, 1:39 AM
Unknown Object (File)
Sep 15 2024, 1:39 AM

Details

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.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable