Skip to content

Commit 09107b3

Browse files
authored
Merge pull request #4008 from myverdict/patch-1
Update part10b.md
2 parents edaaeec + 617c52c commit 09107b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/10/en/part10b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export default RepositoryList;
202202

203203
### Style
204204

205-
Now that we have a basic understanding of how core components work and we can use them to build a simple user interface it is time to add some style. In [part 2](/en/part2/adding_styles_to_react_app) we learned that in the browser environment we can define React component's style properties using CSS. We had the option to either define these styles inline using the <em>style</em> prop or in a CSS file with a suitable selector.
205+
Now that we have a basic understanding of how core components work and we can use them to build a simple user interface it is time to add some styles. In [part 2](/en/part2/adding_styles_to_react_app) we learned that in the browser environment we can define React component's style properties using CSS. We had the option to either define these styles inline using the <em>style</em> prop or in a CSS file with a suitable selector.
206206

207207
There are many similarities in the way style properties are attached to React Native's core components and the way they are attached to DOM elements. In React Native most of the core components accept a prop called <em>style</em>. The <em>style</em> prop accepts an object with style properties and their values. These style properties are in most cases the same as in CSS, however, property names are in <i>camelCase</i>. This means that CSS properties such as <em>padding-top</em> and <em>font-size</em> are written as <em>paddingTop</em> and <em>fontSize</em>. Here is a simple example of how to use the <em>style</em> prop:
208208

0 commit comments

Comments
 (0)