mobx-react 7.0.3 → 7.1.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # mobx-react
2
2
 
3
+ ## 7.1.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`28f8a11d`](https://github.com/mobxjs/mobx/commit/28f8a11d8b94f1aca2eec4ae9c5f45c5ea2f4362)]:
8
+ - mobx@6.1.0
9
+ - mobx-react-lite@4.0.0
10
+
11
+ ## 7.0.6
12
+
13
+ ### Patch Changes
14
+
15
+ - [`592e6e99`](https://github.com/mobxjs/mobx/commit/592e6e996c2d5264e162cfb0921a071c1d815c92) [#2743](https://github.com/mobxjs/mobx/pull/2743) Thanks [@vkrol](https://github.com/vkrol)! - Remove `sideEffects` section in `mobx-react-lite` `package.json`
16
+
17
+ - Updated dependencies [[`6b304232`](https://github.com/mobxjs/mobx/commit/6b30423266e5418a3f20389d0bd0eae31f3384d2), [`83b84fd3`](https://github.com/mobxjs/mobx/commit/83b84fd354f2253fdd8ea556e217a92fc2633c00), [`65c7b73b`](https://github.com/mobxjs/mobx/commit/65c7b73b7f0b1a69a1a2786b5f484419d129d10b), [`989390d4`](https://github.com/mobxjs/mobx/commit/989390d46bbe9941b61ac6c6d1292f96445e7cc3), [`dea1cf18`](https://github.com/mobxjs/mobx/commit/dea1cf189b0f43929f4f626229d34a80bd10212e), [`592e6e99`](https://github.com/mobxjs/mobx/commit/592e6e996c2d5264e162cfb0921a071c1d815c92)]:
18
+ - mobx@6.0.5
19
+ - mobx-react-lite@3.1.7
20
+
21
+ ## 7.0.5
22
+
23
+ ### Patch Changes
24
+
25
+ - [`2f3dcb27`](https://github.com/mobxjs/mobx/commit/2f3dcb274f795ffca4ae724b6b4795958620838d) Thanks [@FredyC](https://github.com/FredyC)! - Fix names of UMD exports [#2517](https://github.com/mobxjs/mobx/issues/2617)
26
+
27
+ - Updated dependencies [[`2f3dcb27`](https://github.com/mobxjs/mobx/commit/2f3dcb274f795ffca4ae724b6b4795958620838d), [`79a09f49`](https://github.com/mobxjs/mobx/commit/79a09f49a9f2baddbab8d89e9a7ac07cffadf624)]:
28
+ - mobx-react-lite@3.1.6
29
+ - mobx@6.0.4
30
+
31
+ ## 7.0.4
32
+
33
+ ### Patch Changes
34
+
35
+ - [`8bbbc7c0`](https://github.com/mobxjs/mobx/commit/8bbbc7c0df77cd79530add5db2d6a04cfe6d84b1) Thanks [@FredyC](https://github.com/FredyC)! - Fix names of dist files (for real now). Third time is the charm 😅
36
+
37
+ - Updated dependencies [[`8bbbc7c0`](https://github.com/mobxjs/mobx/commit/8bbbc7c0df77cd79530add5db2d6a04cfe6d84b1)]:
38
+ - mobx-react-lite@3.1.4
39
+
3
40
  ## 7.0.3
4
41
 
5
42
  ### Patch Changes
package/README.md CHANGED
@@ -11,8 +11,7 @@
11
11
 
12
12
  Package with React component wrapper for combining React with MobX.
13
13
  Exports the `observer` decorator and other utilities.
14
- For documentation, see the [MobX](https://mobxjs.github.io/mobx) project.
15
- There is also work-in-progress [user guide](https://mobx-react.js.org) for additional information.
14
+ For documentation, see the [MobX](https://mobx.js.org) project.
16
15
  This package supports both React and React Native.
17
16
 
18
17
  ## Choosing your version
@@ -25,7 +24,7 @@ There are currently two actively maintained versions of mobx-react:
25
24
  | v6 | 4._ / 5._ | 16.8+ | Yes |
26
25
  | v5 | 4._ / 5._ | 0.13+ | No, but it is possible to use `<Observer>` sections inside hook based components |
27
26
 
28
- mobx-react 6 / 7 is a repackage of the smaller [mobx-react-lite](https://github.com/mobxjs/mobx-react-lite) package + following features from the `mobx-react@5` package added:
27
+ mobx-react 6 / 7 is a repackage of the smaller [mobx-react-lite](https://github.com/mobxjs/mobx/tree/main/packages/mobx-react-lite) package + following features from the `mobx-react@5` package added:
29
28
 
30
29
  - Support for class based components for `observer` and `@observer`
31
30
  - `Provider / inject` to pass stores around (but consider to use `React.createContext` instead)
@@ -45,7 +44,7 @@ import { observer } from "mobx-react"
45
44
  This package provides the bindings for MobX and React.
46
45
  See the [official documentation](https://mobx.js.org/react-integration.html) for how to get started.
47
46
 
48
- For greenfield projects you might want to consider to use [mobx-react-lite](https://github.com/mobxjs/mobx-react-lite), if you intend to only use function based components. `React.createContext` can be used to pass stores around.
47
+ For greenfield projects you might want to consider to use [mobx-react-lite](https://github.com/mobxjs/mobx/tree/main/packages/mobx-react-lite), if you intend to only use function based components. `React.createContext` can be used to pass stores around.
49
48
 
50
49
  ## API documentation
51
50
 
@@ -65,7 +64,7 @@ When using component classes, `this.props` and `this.state` will be made observa
65
64
 
66
65
  `shouldComponentUpdate` is not supported. As such, it is recommended that class components extend `React.PureComponent`. The `observer` will automatically patch non-pure class components with an internal implementation of `React.PureComponent` if necessary.
67
66
 
68
- See the [MobX](https://mobxjs.github.io/mobx/refguide/observer-component.html) documentation for more details.
67
+ See the [MobX](https://mobx.js.org/react-integration.html#react-integration) documentation for more details.
69
68
 
70
69
  ```javascript
71
70
  import { observer } from "mobx-react"
@@ -199,7 +198,7 @@ If you don't want to mark a component as observer, for example to reduce the dep
199
198
 
200
199
  ### Enabling decorators (optional)
201
200
 
202
- Decorators are currently a stage-2 ESNext feature. How to enable them is documented [here](https://github.com/mobxjs/mobx#enabling-decorators-optional).
201
+ Decorators are currently a stage-2 ESNext feature. How to enable them is documented [here](https://mobx.js.org/enabling-decorators.html#enabling-decorators-).
203
202
 
204
203
  ### Should I still use smart and dumb components?
205
204
 
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+
2
+ 'use strict'
3
+
4
+ if (process.env.NODE_ENV === 'production') {
5
+ module.exports = require('./mobxreact.cjs.production.min.js')
6
+ } else {
7
+ module.exports = require('./mobxreact.cjs.development.js')
8
+ }