Compare commits

...
Author SHA1 Message Date
Mike Grabowski fd2313f098 [0.38.0] Bump version numbers 2016-11-22 22:05:21 -08:00
Joel ArvidssonandMike Grabowski 7b2ee7119a Unbreak custom animated components
Summary:
Commit https://github.com/facebook/react-native/commit/c9960817eea008b2703657066212002557e0d939 broke `Animated.createAnimatedComponent()` for most components outside of the standard ones. This is because it will throw an exception for any component without a `viewConfig` defined, which basically no composition style component has AFAIK.

Related issues: https://github.com/facebook/react-native/issues/10825, https://github.com/oblador/react-native-vector-icons/issues/337, https://github.com/oblador/react-native-animatable/issues/70

This PR removes the check which is more treating the symptoms really – but shouldn't `setNativeProps` duck typing be enough?
Closes https://github.com/facebook/react-native/pull/10827

Differential Revision: D4178183

Pulled By: ericvicenti

fbshipit-source-id: b85cc78ed6d84dada4d476caa243332eaadb003f
2016-11-22 22:04:35 -08:00
npomfretandMike Grabowski 9661d726d3 Ensure notification payload is passed to completion handler
Summary:
Fixes #10863
Closes https://github.com/facebook/react-native/pull/10860

Differential Revision: D4175834

Pulled By: hramos

fbshipit-source-id: 5cf317eb675528c647425c70eff939a9db9728fa
2016-11-22 22:04:23 -08:00
Martin Konicek 9de1d4f2dd [0.38.0-rc.1] Bump version numbers 2016-11-21 15:00:55 +00:00
Martin Konicek 8b3fe666aa Add deprecation warning to MapView 2016-11-21 15:00:00 +00:00
Mike Grabowski 3c9d26e618 [0.38.0-rc.0] Bump version numbers 2016-11-08 18:13:52 +01:00
7 changed files with 24 additions and 11 deletions
@@ -1735,12 +1735,6 @@ function createAnimatedComponent(Component: any): any {
var callback = () => {
if (this._component.setNativeProps) {
if (!this._propsAnimated.__isNative) {
if (this._component.viewConfig == null) {
var ctor = this._component.constructor;
var componentName = ctor.displayName || ctor.name || '<Unknown Component>';
throw new Error(componentName + ' "viewConfig" is not defined.');
}
this._component.setNativeProps(
this._propsAnimated.__getAnimatedValue()
);
+13
View File
@@ -86,6 +86,19 @@ export type AnnotationDragState = $Enum<{
const MapView = React.createClass({
componentWillMount: function() {
console.warn(
'MapView is now deprecated and will be removed from React Native in version 0.42. ' +
'Please use the react-native-maps module which is more feature complete ' +
'and works on Android too: https://github.com/airbnb/react-native-maps\n' +
'It is actively maintained and widely used.\n\n' +
'Once MapView is removed from React Native in v0.42, we will release the ' +
'code as deprecated-react-native-ios-mapview. You will be able to ' +
'continue using that and migrate to react-native-maps your own pace later.\n\n' +
'For more info, check out https://github.com/facebook/react-native/pull/10500'
);
},
mixins: [NativeMethodsMixin],
propTypes: {
@@ -219,7 +219,7 @@ RCT_EXPORT_MODULE()
self.remoteNotificationCallbacks[notificationId] = completionHandler;
}
[self sendEventWithName:@"remoteNotificationReceived" body:notification.userInfo];
[self sendEventWithName:@"remoteNotificationReceived" body:remoteNotification];
}
- (void)handleRemoteNotificationsRegistered:(NSNotification *)notification
@@ -139,6 +139,12 @@ var NativeMethodsMixin = {
* Manipulation](docs/direct-manipulation.html)).
*/
setNativeProps: function(nativeProps: Object) {
if (!this.viewConfig) {
var ctor = this.constructor;
var componentName = ctor.displayName || ctor.name || '<Unknown Component>';
invariant(false, componentName + ' "viewConfig" is not defined.');
}
if (__DEV__) {
warnForStyleProps(nativeProps, this.viewConfig.validAttributes);
}
+1 -1
View File
@@ -4,7 +4,7 @@ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
Pod::Spec.new do |s|
s.name = "React"
s.version = package['version']
s.version = "0.38.0"
s.summary = package['description']
s.description = <<-DESC
React Native apps are built using the React JS
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0-master
VERSION_NAME=0.38.0
GROUP=com.facebook.react
POM_NAME=ReactNative
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "react-native",
"version": "1000.0.0",
"version": "0.38.0",
"description": "A framework for building native apps using React",
"license": "BSD-3-Clause",
"repository": {
@@ -228,4 +228,4 @@
"shelljs": "0.6.0",
"sinon": "^2.0.0-pre.2"
}
}
}