Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve dev mode and HMR interop (facebook#24377)
Summary: Motivation is following - I'm sure many people encountered this because it has been like this for a long time. 1 . you're developing something on android, HMR and dev mode is enabled 2 . you go to dev settings, you disable dev mode because you want to see how something behaves 3 . you reload the app because that's what is required for the change to take effect 4 . you wait for the bundle to be compiled and served, and when that is done, you get an error message about HMR not being a registered callable module - because HMR is not available when `__DEV__ === false` (todo screenshot) this fixes the described case by checking if HMR is enabled and dev mode disabled when reloading (step 3) and disables HMR in that case. this also fixes the case when dev mode is disabled and without knowing it, you try to enable HRM (will enable both dev hmr and dev mode). [Android] [Changed] - improve developer experience around Dev mode and HMR interop Pull Request resolved: facebook#24377 Differential Revision: D14890695 Pulled By: cpojer fbshipit-source-id: 95b6ff4131c6d05a32aadd09a9d5ed11f602122c
- Loading branch information