Support Fast Refresh
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 185
- PR merge metrics
- No merged PRs in 30d
Description
## Describe the feature
We've landed [Fast Refresh](https://mobile.twitter.com/reactnative/status/1144629612921720833) on React Native master. You can try it if you build all Metro packages from master and replace them in `node_modules` of RNTester.
## Motivation
It would be nice if Haul could replace `react-hot-loader` or other techniques with Fast Refresh because:
- Fast Refresh doesn't create semantic differences in behavior (so it's safe to always leave on, unlike solutions based on `react-hot-loader` and similar tools)
- Fast Refresh fully supports function components and Hooks, including cases where you add or remove Hooks
- Fast Refresh gracefully recovers from errors
It likely also fixes hot reloading problems with navigation libraries because it's fully integrated with React. (Although I don't have a test case to verify that.)
It would also unify the behavior with mainline React Native.
## But How?
I'd be happy to chat with someone to give an overview of how the new system works. For a 100% match in behavior we might need some new hooks from webpack, but you should be able to get reasonably close today too.
Contributor guide
Assessment
This issue has not been assessed yet.