/
index.js
46 lines (40 loc) · 896 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { useState } from '@tarojs/taro-rn'
import {
PropTypes,
onError,
isUsingStaticRendering,
useStaticRendering,
useLocalStore as originUseLocalStore,
useAsObservableSource as originUseAsObservableSource
} from '@tarojs/mobx-common'
import Provider from './Provider'
import { inject } from './inject'
import { observer } from './observer'
function useLocalStore (initializer, current) {
return originUseLocalStore(initializer, current, useState)
}
function useAsObservableSource (current) {
return originUseAsObservableSource(current, useState)
}
export default {
PropTypes,
onError,
observer,
inject,
Provider,
useLocalStore,
useAsObservableSource,
isUsingStaticRendering,
useStaticRendering
}
export {
PropTypes,
onError,
observer,
inject,
Provider,
useLocalStore,
useAsObservableSource,
isUsingStaticRendering,
useStaticRendering
}