Skip to content

Conversation

brentvatne
Copy link
Member

@brentvatne brentvatne commented Oct 29, 2019

Why

React Native 0.61 replaced live reload and HMR with "Fast Refresh" - this is basically like HMR but it actually works. #5989

How

  • Fast Refresh uses the same settings key as HMR so it was just a matter of renaming that option to get that working.
  • Enabled Fast Refresh by default because that's what is done in React Native upstream and because we used to do that with Live Reload.
  • Remove Live Reload from the menu.
  • Moved Fast Refresh to the top of the developer menu options.

Some additional changes while in this part of the codebase:

  • Removed the "Reload JS" button in SDK36+. It's always been confusing to have multiple ways to reload, and I think it doesn't make sense to keep this around. Now "Reload Manifest and JS Bundle" is just "Reload". If you want to just do a partial refresh, use Fast Refresh.
  • Fixed an issue where if you pulled down to dismiss the dev menu the opacity would be lighter the next time you bring it back because it wasn't properly reset.
  • Added performance monitor key to dev settings and rename the menu option from "perf" to "performance"

Test Plan

Screen Shot 2019-10-28 at 20 51 35

TODO

  • Test on SDK35
  • Provide a better (i) info button in dev menu - currently it shows an alert but that is hidden by the dev menu itself, so you don't see it until you close the dev menu
  • Toggle element inspector should not be available in production mode

Other followup

@brentvatne brentvatne force-pushed the @brent/dev-menu-updates branch from 225798c to 27a7ca9 Compare October 30, 2019 00:00
@brentvatne brentvatne marked this pull request as ready for review October 30, 2019 00:02
@brentvatne brentvatne merged commit ce39401 into master Oct 30, 2019
@brentvatne brentvatne deleted the @brent/dev-menu-updates branch October 30, 2019 01:11
prakashbask pushed a commit to prakashbask/expo that referenced this pull request Mar 16, 2022
…6110)

* [home][ios] Update dev menu for sdk 36 to include fast refresh

* [ios][home] Ensure that live reload is always set to disabled on sdk36+. Also add perf monitor key to dev settings data source

* [ncl] Fix title of action sheet screen

* [home] Clean up menu buttons and stop using alert for additional info

* [home] Tweaks to menu view to look better in < sdk 35

* [home] Fix styles for constants in the bottom of projects screen

* [ios] Improve messaging when hot refresh is not available and do not show element inspector in prod mode

* [home] Make the reason why an option is not available very obvious

* [ios] Remove perf monitor from dev settings data source again, minimize touch in this pr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant