update website

This commit is contained in:
Travis CI
2015-03-30 20:20:33 +00:00
parent 8b25159447
commit 2836362ef2
2 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ CalendarManager<span class="token punctuation">.</span><span class="token functi
location<span class="token punctuation">:</span> <span class="token string">&#x27;4 Privet Drive, Surrey&#x27;</span><span class="token punctuation">,</span>
time<span class="token punctuation">:</span> date<span class="token punctuation">.</span><span class="token function">toTime<span class="token punctuation">(</span></span><span class="token punctuation">)</span><span class="token punctuation">,</span>
description<span class="token punctuation">:</span> <span class="token string">&#x27;...&#x27;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span></div><blockquote><p><strong>NOTE</strong>: About array and map</p><p>React Native doesn&#x27;t provide any guarantees about the types of values in these structures. Your native module might expect array of strings, but if JavaScript calls your method with an array that contains number and string you&#x27;ll get <code>NSArray</code> with <code>NSNumber</code> and <code>NSString</code>. It&#x27;s developer&#x27;s responsibility to check array/map values types (see <a href="https://github.com/facebook/react-native/blob/master/React/Base/RCTConvert.h" target="_blank"><code>RCTConvert</code></a> for helper methods).</p></blockquote><h1><a class="anchor" name="callbacks"></a>Callbacks <a class="hash-link" href="#callbacks">#</a></h1><blockquote><p><strong>WARNING</strong></p><p>This section is even more experimental than others, we don&#x27;t have a set of best practices around callbacks yet.</p></blockquote><p>Native module also supports a special kind of argument - callback. In most cases it is used to provide function call result to JavaScript.</p><div class="prism language-javascript"><span class="token operator">-</span> <span class="token punctuation">(</span>void<span class="token punctuation">)</span>findEvents<span class="token punctuation">:</span><span class="token punctuation">(</span>RCTResponseSenderBlock<span class="token punctuation">)</span>callback
<span class="token punctuation">}</span><span class="token punctuation">)</span></div><blockquote><p><strong>NOTE</strong>: About array and map</p><p>React Native doesn&#x27;t provide any guarantees about the types of values in these structures. Your native module might expect array of strings, but if JavaScript calls your method with an array that contains number and string you&#x27;ll get <code>NSArray</code> with <code>NSNumber</code> and <code>NSString</code>. It&#x27;s the developer&#x27;s responsibility to check array/map values types (see <a href="https://github.com/facebook/react-native/blob/master/React/Base/RCTConvert.h" target="_blank"><code>RCTConvert</code></a> for helper methods).</p></blockquote><h1><a class="anchor" name="callbacks"></a>Callbacks <a class="hash-link" href="#callbacks">#</a></h1><blockquote><p><strong>WARNING</strong></p><p>This section is even more experimental than others, we don&#x27;t have a set of best practices around callbacks yet.</p></blockquote><p>Native module also supports a special kind of argument - callback. In most cases it is used to provide function call result to JavaScript.</p><div class="prism language-javascript"><span class="token operator">-</span> <span class="token punctuation">(</span>void<span class="token punctuation">)</span>findEvents<span class="token punctuation">:</span><span class="token punctuation">(</span>RCTResponseSenderBlock<span class="token punctuation">)</span>callback
<span class="token punctuation">{</span>
<span class="token function">RCT_EXPORT<span class="token punctuation">(</span></span><span class="token punctuation">)</span><span class="token punctuation">;</span>
NSArray <span class="token operator">*</span>events <span class="token operator">=</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
File diff suppressed because one or more lines are too long