Merge pull request #865 from ide/remap-docs

[Docs] Fix formatting for "JavaScript method names" section in docs
This commit is contained in:
Brent Vatne 2015-04-15 14:53:53 -07:00
Родитель 862d9fba09 d2b06138e7
Коммит 2cc3c50235
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -51,7 +51,8 @@ var CalendarManager = require('NativeModules').CalendarManager;
CalendarManager.addEvent('Birthday Party', '4 Privet Drive, Surrey');
```
> **NOTE:** JavaScript method names
> **NOTE**: JavaScript method names
>
> The name of the method exported to JavaScript is the native method's name up to the first colon. React Native also defines a macro called `RCT_REMAP_METHOD` to specify the JavaScript method's name. This is useful when multiple native methods are the same up to the first colon and would have conflicting JavaScript names.
The return type of bridge methods is always `void`. React Native bridge is asynchronous, so the only way to pass a result to JavaScript is by using callbacks or emitting events (see below).