Skip to content

Commit 1987b08

Browse files
author
Preben Ludviksen
committed
Added example of importing to README.
1 parent 66208be commit 1987b08

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ code. You can install and link the HelloWorld component like this:
1212

1313
npm install react-native-helloworld
1414
react-native link react-native-helloworld
15-
15+
1616
## Explanation
1717

1818
For a full explanation of the layout, see
@@ -92,3 +92,14 @@ project settings), and hit ⌘+R.
9292

9393
Once you have finished your components, you can run a normal `npm publish` from the root folder. The
9494
`/tests` and `/example` folders are automatically excluded from the package.
95+
96+
Once installed and linked in a project, your components can easily be imported:
97+
98+
````javascript
99+
import HelloWorld from 'react-native-helloworld';
100+
101+
function MyComponent() {
102+
return <HelloWorld />;
103+
}
104+
````
105+

0 commit comments

Comments
 (0)