Skip to content

Commit

Permalink
Revert fetch instrumentation to only RSC
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Oct 23, 2022
1 parent 0c11baa commit 5d92ed5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions packages/react/src/React.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ import ReactSharedInternals from './ReactSharedInternals';
import {startTransition} from './ReactStartTransition';
import {act} from './ReactAct';

// Patch fetch
import './ReactFetch';

// TODO: Move this branching into the other module instead and just re-export.
const createElement: any = __DEV__
? createElementWithValidation
Expand Down
3 changes: 3 additions & 0 deletions packages/react/src/ReactSharedSubset.experimental.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
* @flow
*/

// Patch fetch
import './ReactFetch';

export {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
Children,
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/__tests__/ReactFetch-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('ReactFetch', () => {
fetchCount = 0;
global.fetch = fetchMock;

React = require('react');
React = require('react/react.shared-subset');
ReactServerDOMServer = require('react-server-dom-webpack/server.browser');
ReactServerDOMClient = require('react-server-dom-webpack/client');
use = React.experimental_use;
Expand Down

0 comments on commit 5d92ed5

Please sign in to comment.