@@ -4,21 +4,45 @@ path: "/getting-started/setup"
4
4
title : " Setup"
5
5
---
6
6
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
8
25
9
26
First, run ` npm install react-native-ui-lib `
10
27
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*
12
31
32
+ If you want it all, install ** peer dependencies**
13
33
```
14
34
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
15
35
16
36
cd ios && pod install
17
37
```
18
38
39
+
19
40
## 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*
20
43
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
22
46
23
47
- "react-native-gesture-handler": ">=1.5.0",
24
48
- "react-native-reanimated": ">=1.4.0",
@@ -37,4 +61,4 @@ To run it:
37
61
- install dependencies: ` npm install `
38
62
- (for iOS) ` cd ios && pod install && cd .. `
39
63
- 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