mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-08-15 18:45:06 +00:00
[add] Update components with native methods
Hack in touch event normalization within `View` to produce events that contain `pageX`, `pageY` for React Native compatibility.
This commit is contained in:
@@ -90,11 +90,11 @@ const mountSafeCallback = (context: Component, callback: ?Function) => () => {
|
||||
return callback.apply(context, arguments)
|
||||
}
|
||||
|
||||
export default NativeMethodsMixin
|
||||
|
||||
export const nativeMethodsDecorator = (Component) => {
|
||||
export const NativeMethodsDecorator = (Component) => {
|
||||
Object.keys(NativeMethodsMixin).forEach((method) => {
|
||||
Component.prototype[method] = NativeMethodsMixin[method]
|
||||
})
|
||||
return Component
|
||||
}
|
||||
|
||||
export default NativeMethodsMixin
|
||||
|
||||
Reference in New Issue
Block a user