-
Notifications
You must be signed in to change notification settings - Fork 47.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduces the size of ReactDOMSharedIntenrals object representation to …
…save on bundle size
- Loading branch information
Showing
16 changed files
with
364 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @flow | ||
*/ | ||
|
||
import type {EventPriority} from 'react-reconciler/src/ReactEventPriorities'; | ||
import type {HostDispatcher} from './shared/ReactDOMTypes'; | ||
|
||
import {NoEventPriority} from 'react-reconciler/src/ReactEventPriorities'; | ||
|
||
type ReactDOMInternals = { | ||
Events: [any, any, any, any, any, any], | ||
d /* ReactDOMCurrentDispatcher */: HostDispatcher, | ||
p /* currentUpdatePriority */: EventPriority, | ||
findDOMNode: | ||
| null | ||
| (( | ||
componentOrElement: React$Component<any, any>, | ||
) => null | Element | Text), | ||
}; | ||
|
||
function noop() {} | ||
|
||
const DefaultDispatcher: HostDispatcher = { | ||
flushSyncWork: noop, | ||
prefetchDNS: noop, | ||
preconnect: noop, | ||
preload: noop, | ||
preloadModule: noop, | ||
preinitScript: noop, | ||
preinitStyle: noop, | ||
preinitModuleScript: noop, | ||
}; | ||
|
||
const Internals: ReactDOMInternals = { | ||
Events: (null: any), | ||
d /* ReactDOMCurrentDispatcher */: DefaultDispatcher, | ||
p /* currentUpdatePriority */: NoEventPriority, | ||
findDOMNode: null, | ||
}; | ||
|
||
export default Internals; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.