1
- # ` @reason -react-native/async-storage `
1
+ # ` @rescript -react-native/async-storage `
2
2
3
- [ ![ Build Status] ( https://github.com/reason -react-native/async-storage/workflows/Build/badge.svg )] ( https://github.com/reason -react-native/async-storage/actions )
4
- [ ![ Version] ( https://img.shields.io/npm/v/@reason -react-native/async-storage.svg )] ( https://www.npmjs.com/@reason -react-native/async-storage )
5
- [ ![ Chat ] ( https://img.shields.io/discord/235176658175262720.svg?logo=discord&colorb=blue )] ( https://reason-react-native.github.io/discord / )
3
+ [ ![ Build Status] ( https://github.com/rescript -react-native/async-storage/workflows/Build/badge.svg )] ( https://github.com/rescript -react-native/async-storage/actions )
4
+ [ ![ Version] ( https://img.shields.io/npm/v/@rescript -react-native/async-storage.svg )] ( https://www.npmjs.com/@rescript -react-native/async-storage )
5
+ [ ![ ReScript Forum ] ( https://img.shields.io/discourse/posts?color=e6484f&label=ReScript%20Forum&server=https%3A%2F%2Fforum.rescript-lang.org )] ( https://forum.rescript-lang.org / )
6
6
7
- [ ReScript] ( https://rescript-lang.org ) / [ Reason ] ( https://reasonml.github.io ) bindings for
7
+ [ ReScript] ( https://rescript-lang.org ) bindings for
8
8
[ ` @react-native-async-storage/async-storage ` ] ( https://github.com/react-native-async-storage/async-storage ) .
9
9
10
10
Exposed as ` ReactNativeAsyncStorage ` module.
11
11
12
- ` @reason -react-native/async-storage ` X.y.\* means it's compatible with
12
+ ` @rescript -react-native/async-storage ` X.y.\* means it's compatible with
13
13
` @react-native-async-storage/async-storage ` X.y.\*
14
14
15
15
## Installation
@@ -20,22 +20,22 @@ is properly installed & configured by following their installation instructions,
20
20
you can install the bindings:
21
21
22
22
``` console
23
- npm install @reason -react-native/async-storage
23
+ npm install @rescript -react-native/async-storage
24
24
# or
25
- yarn add @reason -react-native/async-storage
25
+ yarn add @rescript -react-native/async-storage
26
26
```
27
27
28
- ` @reason -react-native/async-storage ` should be added to ` bs-dependencies ` in
28
+ ` @rescript -react-native/async-storage ` should be added to ` bs-dependencies ` in
29
29
your ` bsconfig.json ` :
30
30
31
31
``` diff
32
32
{
33
33
//...
34
34
"bs-dependencies": [
35
- "reason- react",
36
- "reason -react-native",
35
+ "@rescript/ react",
36
+ "rescript -react-native",
37
37
// ...
38
- + "@reason -react-native/async-storage"
38
+ + "@rescript -react-native/async-storage"
39
39
],
40
40
//...
41
41
}
@@ -47,7 +47,7 @@ your `bsconfig.json`:
47
47
48
48
#### ` ReactNativeAsyncStorage.asyncStorageState `
49
49
50
- ``` reason
50
+ ``` rescript
51
51
type asyncStorageState = {
52
52
getItem: unit => Js.Promise.t(Js.Null.t(string)),
53
53
setItem: string => Js.Promise.t(unit),
@@ -64,73 +64,73 @@ type asyncStorageState = {
64
64
65
65
#### ` ReactNativeAsyncStorage.getItem `
66
66
67
- ``` reason
67
+ ``` rescript
68
68
string => Js.Promise.t(Js.Null.t(string))
69
69
```
70
70
71
71
#### ` ReactNativeAsyncStorage.setItem `
72
72
73
- ``` reason
73
+ ``` rescript
74
74
(string, string) => Js.Promise.t(unit)
75
75
```
76
76
77
77
#### ` ReactNativeAsyncStorage.removeItem `
78
78
79
- ``` reason
79
+ ``` rescript
80
80
string => Js.Promise.t(unit)
81
81
```
82
82
83
83
#### ` ReactNativeAsyncStorage.mergeItem `
84
84
85
- ``` reason
85
+ ``` rescript
86
86
(string, string) => Js.Promise.t(unit)
87
87
```
88
88
89
89
#### ` ReactNativeAsyncStorage.clear `
90
90
91
- ``` reason
91
+ ``` rescript
92
92
unit => Js.Promise.t(unit)
93
93
```
94
94
95
95
#### ` ReactNativeAsyncStorage.getAllKeys `
96
96
97
- ``` reason
97
+ ``` rescript
98
98
unit => Js.Promise.t(Js.Null.t(array(string)))
99
99
```
100
100
101
101
#### ` ReactNativeAsyncStorage.multiGet `
102
102
103
- ``` reason
103
+ ``` rescript
104
104
array(string) => Js.Promise.t(array((string, Js.Null.t(string))))
105
105
```
106
106
107
107
#### ` ReactNativeAsyncStorage.multiSet `
108
108
109
- ``` reason
109
+ ``` rescript
110
110
array((string, string)) => Js.Promise.t(unit)
111
111
```
112
112
113
113
#### ` ReactNativeAsyncStorage.multiMerge `
114
114
115
- ``` reason
115
+ ``` rescript
116
116
array((string, string)) => Js.Promise.t(unit)
117
117
```
118
118
119
119
#### ` ReactNativeAsyncStorage.multiRemove `
120
120
121
- ``` reason
121
+ ``` rescript
122
122
array(string) => Js.Promise.t(unit)
123
123
```
124
124
125
125
#### ` ReactNativeAsyncStorage.flushGetRequests `
126
126
127
- ``` reason
127
+ ``` rescript
128
128
unit => unit
129
129
```
130
130
131
131
#### ` ReactNativeAsyncStorage.useAsyncStorage `
132
132
133
- ``` reason
133
+ ``` rescript
134
134
string => asyncStorageState
135
135
```
136
136
@@ -146,11 +146,11 @@ releases.
146
146
## Contribute
147
147
148
148
Read the
149
- [ contribution guidelines] ( https://github.com/reason -react-native/.github/blob/master/CONTRIBUTING.md )
149
+ [ contribution guidelines] ( https://github.com/rescript -react-native/.github/blob/master/CONTRIBUTING.md )
150
150
before contributing.
151
151
152
152
## Code of Conduct
153
153
154
154
We want this community to be friendly and respectful to each other. Please read
155
- [ our full code of conduct] ( https://github.com/reason -react-native/.github/blob/master/CODE_OF_CONDUCT.md )
155
+ [ our full code of conduct] ( https://github.com/rescript -react-native/.github/blob/master/CODE_OF_CONDUCT.md )
156
156
so that you can understand what actions will and will not be tolerated.
0 commit comments