Removed Platform.web#23830
Closed
EvanBacon wants to merge 1 commit intofacebook:masterfrom
EvanBacon:@evanbacon/expo-web/revert-internals
Closed
Removed Platform.web#23830EvanBacon wants to merge 1 commit intofacebook:masterfrom EvanBacon:@evanbacon/expo-web/revert-internals
Platform.web#23830EvanBacon wants to merge 1 commit intofacebook:masterfrom
EvanBacon:@evanbacon/expo-web/revert-internals
Conversation
Initially if a `react-native-web` project were to use a library that required internals `@expo/webpack-config` would polyfill those internals. This `Platform` was used for cases where react-native modules needed other internal `react-native` modules, ex: `Animated/src/AnimatedEvent -> Renderer/shims/ReactNative -> Renderer/oss/ReactNativeRenderer-dev -> Core/InitializeCore -> Devtools/setupDevtools -> WebSocket/WebSocket -> Utilities/Platform` The consensus is that if any react-native library references a react-native internal (ex: `react-native/*`), it should continue to throw errors. We've removed the use of internals from all of the Unimodules, `react-navigation`, and `react-native-gesture-handler`. This covers a wide enough area for a lot of projects to get web support. * Add emitters for libs referencing internals necolas/react-native-web#1275 * Remove monkey patch that bundles RN, libs that use internals will crash instead expo/expo-cli#409 * Remove all unsupported internals and polyfills from the Expo suite expo/expo#3676 * Remove internals from react-native-gesture-handler software-mansion/react-native-gesture-handler#406
facebook-github-bot
approved these changes
Mar 11, 2019
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
@hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Collaborator
|
This pull request was successfully merged by @EvanBacon in 05d5eeb. When will my fix make it into a release? | Upcoming Releases |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Initially if a
react-native-webproject were to use a library that required internals@expo/webpack-configwould polyfill those internals. ThisPlatform.webwas used for cases wherereact-nativemodules needed other internalreact-nativemodules, ex:Animated/src/AnimatedEvent -> Renderer/shims/ReactNative -> Renderer/oss/ReactNativeRenderer-dev -> Core/InitializeCore -> Devtools/setupDevtools -> WebSocket/WebSocket -> Utilities/PlatformThe consensus is that if any
react-nativelibrary references areact-nativeinternal (ex:react-native/*), it should continue to throw errors. We've removed the use of internals from all of the Unimodules,react-navigation, andreact-native-gesture-handler. This covers a wide enough area for a lot of projects to get web support.Add emitters for libs referencing internals Made NativeEventEmitter work as expected. necolas/react-native-web#1275
Remove monkey patch that bundles RN, libs that use internals will crash instead Updated webpack-config expo/expo-cli#409
Remove all unsupported internals and polyfills from the Expo suite [web] Polyfill emitters expo/expo#3676
Remove internals from react-native-gesture-handler fix: web compatibility software-mansion/react-native-gesture-handler#406
Related [Web] Add Platform module for web target #23387
Changelog
[GENERAL] [REMOVED] - Platform.web.js
Test Plan
Nothing should be effected given the
@expo/webpack-confighasn't been released to the public yet.