mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Deploy website
Deploy website version based on 1233be1289adb6c48ad8e7ad1688077feef92e81
This commit is contained in:
@@ -121,7 +121,7 @@ StyleSheet<span class="token punctuation">.</span><span class="token function">f
|
||||
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
StyleSheet<span class="token punctuation">.</span><span class="token function">flatten</span><span class="token punctuation">(</span>styles<span class="token punctuation">.</span>listItem<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
<span class="token comment">// return { flex: 1, fontSize: 16, color: 'white' }</span>
|
||||
<span class="token comment">// returns { flex: 1, fontSize: 16, color: 'white' }</span>
|
||||
<span class="token comment">// Simply styles.listItem would return its ID (number)</span>
|
||||
</code></pre>
|
||||
<p>This method internally uses <code>StyleSheetRegistry.getStyleByID(style)</code> to resolve style objects represented by IDs. Thus, an array of style objects (instances of <code>StyleSheet.create()</code>), are individually resolved to, their respective objects, merged as one and then returned. This also explains the alternative use.</p>
|
||||
|
||||
@@ -121,7 +121,7 @@ StyleSheet<span class="token punctuation">.</span><span class="token function">f
|
||||
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
StyleSheet<span class="token punctuation">.</span><span class="token function">flatten</span><span class="token punctuation">(</span>styles<span class="token punctuation">.</span>listItem<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
<span class="token comment">// return { flex: 1, fontSize: 16, color: 'white' }</span>
|
||||
<span class="token comment">// returns { flex: 1, fontSize: 16, color: 'white' }</span>
|
||||
<span class="token comment">// Simply styles.listItem would return its ID (number)</span>
|
||||
</code></pre>
|
||||
<p>This method internally uses <code>StyleSheetRegistry.getStyleByID(style)</code> to resolve style objects represented by IDs. Thus, an array of style objects (instances of <code>StyleSheet.create()</code>), are individually resolved to, their respective objects, merged as one and then returned. This also explains the alternative use.</p>
|
||||
|
||||
Reference in New Issue
Block a user