Files
flipper/.flowconfig
Anton Nikolaev a54aad57a7 Fast refresh
Summary:
This diff enables optional [Fast Refresh](https://reactnative.dev/docs/fast-refresh) for Flipper in dev mode. It can be opted-in using additional argument "--fast-refresh": `yarn start --fast-refresh`. I've copy-pasted the most part of implementation from React Native with some minor changes.

I made this optional for now as it works not ideally. In most cases which I checked it works fine, however for some files it falls back to full refresh (e.g. when `desktop/plugins/network/index.tsx` changed) and sometimes doesn't refresh content even after change detected and re-compiled (e.g. when `src/ui/components/searchable/Searchable.tsx` is changed, Network plugin which is dependent on it is not refreshed automatically).

State from redux is restored after fast refresh, but local state in class-based components is cleared. For function-based components local state is also stored, so it's an additional point to make plugins components functional :)

Also, for now there is no UI for Fast Refresh (loading indicator etc), information is just logged to console.

Changelog: Experimental support for Fast Refresh in dev mode can be enabled by `yarn start --fast-refresh`.

Reviewed By: jknoxville

Differential Revision: D20993073

fbshipit-source-id: 65632788df105a85fac0b924b7808120900b349e
2020-04-14 07:20:40 -07:00

45 lines
932 B
Plaintext

[ignore]
.*/coverage/.*
.*/build/.*
.*/dist/.*
.*\.tsx
.*\.ts
.*/node_modules/.*
<PROJECT_ROOT>/scripts/.*
<PROJECT_ROOT>/desktop/scripts/.*
<PROJECT_ROOT>/desktop/static/.*
<PROJECT_ROOT>/desktop/pkg/.*
<PROJECT_ROOT>/desktop/doctor/.*
<PROJECT_ROOT>/desktop/app/.*
<PROJECT_ROOT>/desktop/babel-transformer/.*
<PROJECT_ROOT>/desktop/plugins/fb/relaydevtools/relay-devtools/DevtoolsUI.js$
<PROJECT_ROOT>/website/.*
<PROJECT_ROOT>/desktop/plugins/sections/d3/d3.js$
<PROJECT_ROOT>/react-native/ReactNativeFlipperExample/.*
[libs]
desktop/flow-typed
[options]
esproposal.export_star_as=enable
esproposal.optional_chaining=enable
module.use_strict=true
emoji=true
all=true
include_warnings=true
module.name_mapper='^\(.*\)\.tsx$' -> 'TsStub'
suppress_type=$FlowFixMe
module.system=haste
[strict]
deprecated-type
nonstrict-import
sketchy-null
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import
[version]
0.121.0