@@ -5,9 +5,32 @@ Primitive React Interfaces Across Targets
55## Installation
66
77``` sh
8- npm i --save react-primitives
8+ npm install --save react-primitives
99```
1010
11+ You will also need to install the targets you want to support:
12+
13+ - web:
14+ ``` sh
15+ npm install --save react-dom react-native-web react-art
16+ ```
17+ - native iOS and Android:
18+ ``` sh
19+ npm install --save react-native
20+ ```
21+ - sketch:
22+ ``` sh
23+ npm install --save react-sketchapp react-test-renderer
24+ ```
25+ - vr:
26+ ``` sh
27+ npm install --save react-vr
28+ ```
29+ - Windows:
30+ ``` sh
31+ npm install --save react-native-windows
32+ ```
33+
1134### Usage
1235
1336``` jsx
@@ -33,7 +56,6 @@ const styles = StyleSheet.create({
3356});
3457```
3558
36-
3759## What is this?
3860
3961This library attempts to propose an ideal set of primitives around building
@@ -44,20 +66,24 @@ don't use platform-specific APIs.
4466Importantly, this includes ` StyleSheet ` for declaring styles, as well as
4567` Animated ` for doing declarative Animations.
4668
47- The exported interface thus far is :
69+ The exported APIs thus far are :
4870
49711 . ` Animated ` : Pulled from the [ animated] ( https://github.com/animatedjs/animated ) project.
50722 . ` StyleSheet ` : Follows React Native's StyleSheet API.
51733 . ` View ` : A base component for Layout.
52744 . ` Text ` : A base component for Text rendering.
53755 . ` Image ` : A base component for Image rendering.
54766 . ` Touchable ` : A base component for interaction.
77+ 7 . ` Easing ` : A base set of easing functions.
78+ 8 . ` Dimensions ` : Get the devices dimensions.
79+ 9 . ` PixelRatio ` : Get the devices pixel density.
80+ 10 . ` Platform ` : Get information about the platform. (iOS, Android, Web, Sketch, VR,...)
5581
5682In the future, a ` TextInput ` component may also be added.
5783
5884
5985## Props where props are due
6086
61- This library was largely inspired from the work done by [ Nicolas Gallager] ( https://github.com/necolas )
87+ This library was largely inspired from the work done by [ Nicolas Gallager] ( https://github.com/necolas )
6288and his great work on the [ react-native-web] ( https://github.com/necolas/react-native-web ) library. A few of the files
6389in this repo are even copied directly from his project.
0 commit comments