You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-121Lines changed: 2 additions & 121 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,132 +14,13 @@ React Native Skia brings the Skia Graphics Library to React Native. Skia serves
14
14
15
15
_This is an alpha release. Use with caution._
16
16
17
-
## Installation
18
-
19
-
React Native Skia brings the [Skia Graphics Library](https://skia.org/) to React Native.
20
-
Skia serves as the graphics engine for Google Chrome and Chrome OS, Android, Flutter, Mozilla Firefox and Firefox OS, and many other products.
21
-
22
-
```sh
23
-
yarn add @shopify/react-native-skia
24
-
```
25
-
26
-
Or using npm:
17
+
## Getting Started
27
18
28
19
```sh
29
20
npm install @shopify/react-native-skia
30
21
```
31
22
32
-
### iOS
33
-
34
-
Run `pod install` on the `ios/` directory.
35
-
36
-
### Android
37
-
38
-
> **Version compatibility**: `react-native@>=0.66` is required.
39
-
40
-
Currently, you will need Android NDK to be installed.
41
-
If you have Android Studio installed, make sure `$ANDROID_NDK` is available.
42
-
`ANDROID_NDK=/Users/username/Library/Android/sdk/ndk-bundle` for instance.
43
-
44
-
If the NDK is not installed, you can install it via Android Studio by going to the menu _File > Project Structure_
45
-
46
-
And then the _SDK Location_ section. It will show you the NDK path, or the option to Download it if you don't have it installed.
47
-
48
-
And them the _Modules_ section. click on `shopify_react-native-skia` and select _NDK version_ with dropdown, and click on apply.
49
-
50
-
#### Proguard
51
-
52
-
If you're using Proguard, make sure to add the following rule:
53
-
54
-
```
55
-
-keep class com.shopify.reactnative.skia.** { *; }
56
-
```
57
-
58
-
#### TroubleShooting
59
-
60
-
For error **_CMake 'X.X.X' was not found in SDK, PATH, or by cmake.dir property._**
61
-
62
-
open _Tools > SDK Manager_, switch to the _SDK Tools_ tab.
63
-
Find `CMake` and click _Show Package Details_ and download compatiable version **'X.X.X'**, and apply to install.
64
-
65
-
### Playground
66
-
67
-
We have an example project you can play with [here](https://github.com/Shopify/react-native-skia/tree/main/example).
68
-
69
-
```sh
70
-
$ yarn
71
-
$ cd package && yarn &&cd ..
72
-
$ cd example && yarn && yarn start
73
-
```
74
-
75
-
To run the example project on iOS, you will need to run `pod install` and on Android you will also need Android NDK to be installed ([see here](#android)).
76
-
77
-
## Hello World
78
-
79
-
React Native Skia has two APIs: a declarative API available as a React Native Renderer and an imperative API backed by JSI.
80
-
The recommended way to use this library is via the declarative API.
81
-
Library developers may take advantage of the imperative API to provide custom features.
82
-
83
-
## Declarative API
84
-
85
-
### Example
86
-
87
-
```tsx twoslash
88
-
import { Canvas, Circle, Group } from"@shopify/react-native-skia";
Documentation is available at [https://shopify.github.io/react-native-skia](https://shopify.github.io/react-native-skia/docs/getting-started/installation/).
0 commit comments