[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:
Nicolas Gallagher
2016-02-22 16:41:50 -08:00
parent 267a9b55bf
commit 4845de5cb5
14 changed files with 196 additions and 31 deletions
+3 -3
View File
@@ -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