mobx-react-use-autorun 3.0.35 → 3.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -97,18 +97,27 @@ Form validation<br/>
|
|
|
97
97
|
|
|
98
98
|
useMobxState provides two usages.<br/>
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
The first:
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
useMobxState({
|
|
103
|
+
name: 'tom',
|
|
104
|
+
age: 16
|
|
105
|
+
}, {
|
|
106
|
+
...props,
|
|
107
|
+
init: useIntl(),
|
|
108
|
+
})
|
|
103
109
|
|
|
104
110
|
is easy to use, you can define state and third-party hooks.<br/>
|
|
105
111
|
|
|
112
|
+
The second:
|
|
113
|
+
|
|
106
114
|
useMobxState(() => ({
|
|
107
|
-
get (){
|
|
108
|
-
return state.name
|
|
115
|
+
get myInfo(){
|
|
116
|
+
return `${state.name}'s age is ${state.age}`
|
|
109
117
|
},
|
|
110
118
|
name: string = 'tom',
|
|
111
|
-
|
|
119
|
+
age: 13,
|
|
120
|
+
}), {
|
|
112
121
|
...props,
|
|
113
122
|
intl: useIntl(),
|
|
114
123
|
})
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"mobx-react-use-autorun","version":"3.0.
|
|
1
|
+
{"name":"mobx-react-use-autorun","version":"3.0.36","description":"React Hook for mobx","scripts":{"test":"npx -y -p typescript -p ts-node ts-node --skipProject bin/mobx_react_test.ts","build":"npx -y -p typescript -p ts-node ts-node --skipProject bin/mobx_react_build.ts","make":"npx -y -p typescript -p ts-node ts-node --skipProject bin/mobx_react_make.ts"},"dependencies":{"mobx":">=6.5.0","mobx-react-lite":">=3.3.0","react-use":">=17.3.2","rxjs":">=6.0.0"},"peerDependencies":{"react":">=16.8.0"},"license":"MIT","keywords":["react","mobx","typescript"],"main":"./dist/index.js","types":"./dist/index.d.ts","eslintConfig":{"extends":["react-app","react-app/jest"]},"homepage":"https://github.com/zdu-strong/mobx-react-use-autorun#readme","repository":{"type":"git","url":"git+https://github.com/zdu-strong/mobx-react-use-autorun.git"},"files":["lib","dist"],"bugs":{"url":"https://github.com/zdu-strong/mobx-react-use-autorun/issues"},"publishConfig":{"registry":"https://registry.npmjs.org/"}}
|