dillon1000/react
Commit
Browse files refactor[react-devtools]: propagate settings from global hook object to frontend (#30610)
Stacked on https://github.com/facebook/react/pull/30597 and whats under it. See [this commit](https://github.com/facebook/react/pull/30610/commits/59b4efa72377bf62f5ec8c0e32e56902cf73fbd7). With this change, the initial values for console patching settings are propagated from hook (which is the source of truth now, because of https://github.com/facebook/react/pull/30596) to the UI. Instead of reading from `localStorage` the frontend is now requesting it from the hook. This happens when settings modal is rendered, and wrapped in a transition. Also, this is happening even if settings modal is not opened yet, so we have enough time to fetch this data without displaying loader or similar UI.
Changed paths11 files
First-parent comparisonpackages/react-devtools-core/src/backend.js ModifiedM packages/react-devtools-core/src/cachedSettings.js ModifiedM packages/react-devtools-shared/src/backend/agent.js ModifiedM packages/react-devtools-shared/src/backend/index.js ModifiedM packages/react-devtools-shared/src/bridge.js ModifiedM packages/react-devtools-shared/src/devtools/store.js ModifiedM packages/react-devtools-shared/src/devtools/views/Settings/DebuggingSettings.js ModifiedM packages/react-devtools-shared/src/devtools/views/Settings/SettingsContext.js ModifiedM packages/react-devtools-shared/src/devtools/views/Settings/SettingsModal.js ModifiedM packages/react-devtools-shared/src/devtools/views/Settings/SettingsModalContext.js ModifiedM packages/react-devtools-shared/src/hook.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…