-
-
Notifications
You must be signed in to change notification settings - Fork 982
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
customDirectEventTypes
to separate files. (#2786)
## Description `customDirectEventTypes` import inside `createHandler` introduced in #2766 makes web unable to compile since `react-native-web` doesn't provide this object. This PR moves mentioned import into separate file and splits it into `.ts` and `.web.ts` parts ## Test plan Tested on web and FabricExample app.
- Loading branch information
Showing
3 changed files
with
8 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// @ts-ignore - its taken straight from RN | ||
export { customDirectEventTypes } from 'react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry'; |
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,5 @@ | ||
// customDirectEventTypes doesn't exist in react-native-web, therefore importing it | ||
// directly in createHandler.tsx would end in crash. | ||
const customDirectEventTypes = {}; | ||
|
||
export { customDirectEventTypes }; |