Skip to content

Commit 00b50ab

Browse files
authored
Update setup guidelines
1 parent 997d2ea commit 00b50ab

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

markdowns/getting-started/setup.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,45 @@ path: "/getting-started/setup"
44
title: "Setup"
55
---
66

7-
## Install uilib
7+
## UILib Packages
8+
Before you start.
9+
Starting version 5.12.0 UILib exports individual packages so you can import only what you need.
10+
11+
**Why packages are important?**
12+
- Smaller bundle size. By importing only the components you need, your bundle size will be reduced to the files that were imported.
13+
- Quicker setup. Avoid installing peer dependencies and linking native depdencies that you don't need.
14+
15+
**How does it work?**
16+
```
17+
import View from 'react-native-ui-lib/view';
18+
import Text from 'react-native-ui-lib/text';
19+
import {KeyboardTrackingView, KeyboardAwareInsetsView, KeyboardRegistry, KeyboardAccessoryView, KeyboardUtils} from 'react-native-ui-lib/keyboard';
20+
...
21+
```
22+
23+
24+
## Install UILib
825

926
First, run `npm install react-native-ui-lib`
1027

11-
And then, install **peer dependencies**
28+
### Peer Dependencies
29+
:information_source: If you're planning on using speicific components, see **UILib Packages**.
30+
*For some packages you might still need to install one of the peer dependencies*
1231

32+
If you want it all, install **peer dependencies**
1333
```
1434
npm i react-native-gesture-handler react-native-reanimated @react-native-community/blur @react-native-community/datetimepicker @react-native-community/netinfo @react-native-community/picker
1535
1636
cd ios && pod install
1737
```
1838

39+
1940
## Install Native Dependencies (must)
41+
:information_source: If you're planning on using speicific components, see **UILib Packages**.
42+
*For some packages you might still need to install one of the native dependencies*
2043

21-
Some of the components are using these native dependencies, they are defined as peer dependencies so you can install the version that suit you.
44+
Some of the components are using these native dependencies, they are defined as peer dependencies so you can install the version that suit you.
45+
It's important to run `cd ios && pod install` if you are using a component that has native dependency
2246

2347
- "react-native-gesture-handler": ">=1.5.0",
2448
- "react-native-reanimated": ">=1.4.0",
@@ -37,4 +61,4 @@ To run it:
3761
- install dependencies: `npm install`
3862
- (for iOS) `cd ios && pod install && cd ..`
3963
- start the packager: `npm start`
40-
- run: `react-native run-ios` or `react-native run-android` (or within Xcode or Android Studio)
64+
- run: `npm run ios` or `npm run android` (or within Xcode or Android Studio)

0 commit comments

Comments
 (0)