mirror of
https://github.com/status-im/react-native.git
synced 2025-01-28 18:25:06 +00:00
Update native-modules-android.md
Summary: `import com.facebook.react.bridge.Callback;` is needed to be able to use `Callback` as a parameter. <!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html Happy contributing! --> Thought it needed to be clearer that you need to import `Callback` as it's not a native Java type. (Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!) <!-- Help reviewers and the release process by writing your own release notes **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [-{Component}-] [ INTERNAL ] [ ENHANCEMENT ] [ {File} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| [CATEGORY] [TYPE] [LOCATION] - MESSAGE EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> Closes https://github.com/facebook/react-native/pull/17015 Differential Revision: D6464454 Pulled By: hramos fbshipit-source-id: dfb57f4176483c4e95539c5db03a86f01892e587
This commit is contained in:
parent
19b0a65c5e
commit
94cd9f5591
@ -171,6 +171,8 @@ ToastExample.show('Awesome', ToastExample.SHORT);
|
||||
Native modules also support a special kind of argument - a callback. In most cases it is used to provide the function call result to JavaScript.
|
||||
|
||||
```java
|
||||
import com.facebook.react.bridge.Callback;
|
||||
|
||||
public class UIManagerModule extends ReactContextBaseJavaModule {
|
||||
|
||||
...
|
||||
|
Loading…
x
Reference in New Issue
Block a user