mobx-react-use-autorun 3.0.44 → 3.0.45

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.
Files changed (2) hide show
  1. package/README.md +10 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -22,7 +22,13 @@ Builds the files for production to the `dist` folder.<br/>
22
22
 
23
23
  Publish to npm repository
24
24
 
25
- ## Notes - Define state and props with useMobxState
25
+ ## `Installation`
26
+
27
+ npm install mobx-react-use-autorun
28
+
29
+ ## `Usage`
30
+
31
+ ### Notes - Define state and props with useMobxState
26
32
 
27
33
  import { useMobxState, observer } from 'mobx-react-use-autorun';
28
34
  import { useRef } from 'react';
@@ -124,7 +130,7 @@ The second:
124
130
 
125
131
  Provide a method to generate state, the state is executed only once, and the performance is better.<br/>
126
132
 
127
- ## Notes - Subscription property changes with useMobxEffect
133
+ ### Notes - Subscription property changes with useMobxEffect
128
134
 
129
135
  import { useMobxState, observer } from 'mobx-react-use-autorun';
130
136
  import { useMobxEffect, toJS } from 'mobx-react-use-autorun'
@@ -142,7 +148,7 @@ Provide a method to generate state, the state is executed only once, and the per
142
148
  </div>
143
149
  })
144
150
 
145
- ## Notes - Get the real data of the proxy object with toJS
151
+ ### Notes - Get the real data of the proxy object with toJS
146
152
 
147
153
  toJS will cause data to be used, please do not execute toJS(state) in component rendering code, it may cause repeated rendering. Wrong Usage Demonstration:<br/>
148
154
 
@@ -181,7 +187,7 @@ Other than that, all usages are correct. Example:<br/>
181
187
  return <button onClick={() => console.log(toJS(state))}>{'Click Me'}</button>;
182
188
  })
183
189
 
184
- ## Notes - Define global mutable data
190
+ ### Notes - Define global mutable data
185
191
 
186
192
  import { observable } from 'mobx-react-use-autorun';
187
193
 
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"mobx-react-use-autorun","version":"3.0.44","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.7.0","mobx-react-lite":"3.4.0","react-use":"17.4.0","rxjs":"7.5.7"},"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/"}}
1
+ {"name":"mobx-react-use-autorun","version":"3.0.45","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.7.0","mobx-react-lite":"3.4.0","react-use":"17.4.0","rxjs":"7.5.7"},"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/"}}