Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
Add missing breaking change for 0.58 (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
karanjthakkar authored and axe-fb committed Feb 18, 2019
1 parent e3d6511 commit efe82ec
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,26 @@ Thanks to those who gave feedback on during the [release candidate phase](https:
#### Breaking Changes 💥

- Public methods of components converted to ES6 classes are no longer bound to their component instance. For `ScrollView`, the affected methods are `setNativeProps`, `getScrollResponder`, `getScrollableNode`, `getInnerViewNode`, `scrollTo`, `scrollToEnd`, `scrollWithoutAnimationTo`, and `flashScrollIndicators`. For `CameraRollView`, the affected methods are: `rendererChanged`. For `SwipeableRow`, the affected methods are: `close`. Therefore, it is no longer safe to pass these method by reference as callbacks to functions. Auto-binding methods to component instances was a behaviour of `createReactClass` that we decided to not preserve when switching over to ES6 classes. (you can refer to [this example](https://github.com/react-native-community/react-native-releases/issues/81#issuecomment-459252692))
- Native Modules in Android now require `@ReactModule` annotations to access `.getNativeModule` method on the `ReactContext`. This is how your updated Native Module should look like:

```diff
// CustomModule.java

// ...
+ import com.facebook.react.module.annotations.ReactModule;

+ @ReactModule(name="CustomBridge")
public class CustomModule extends ReactContextBaseJavaModule {
// ...

@Override
public String getName() {
return "CustomBridge";
}

// ...
}
```

#### Android specific

Expand Down

0 comments on commit efe82ec

Please sign in to comment.