Skip to content

Commit

Permalink
Update native-modules-android.md
Browse files Browse the repository at this point in the history
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 #17015

Differential Revision: D6464454

Pulled By: hramos

fbshipit-source-id: dfb57f4176483c4e95539c5db03a86f01892e587
  • Loading branch information
dsandmark authored and facebook-github-bot committed Dec 1, 2017
1 parent 19b0a65 commit 94cd9f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/native-modules-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

...
Expand Down

0 comments on commit 94cd9f5

Please sign in to comment.