All Versions
96
Latest Version
Avg Release Cycle
29 days
Latest Release
34 days ago

Changelog History
Page 1

  • v6.1.4

    October 14, 2019
  • v6.1.3

    August 09, 2019
  • v6.1.2

    August 08, 2019
    • Add reexport of useObserver from mobx-react-lite #734
    • Add the ability to pass multiple children to Provider
    • 🛠 Fixed #717. Now inject works correctly with components that use React.forwardRef
    • Observer checks for use of React.memo #720
    • Get rid of the redundant Injector wrapper #716
  • v6.1.1

    June 19, 2019
    • 🛠 Fixed issue where combining @disposeOnUnmount with disposeOnUnmount didn't clean up everything. Fixes #666 trough #671 by @JabX
  • v6.1.0

    June 19, 2019
    • 👀 Restored the classic implementation of observer: class based components are patched again, rather than wrapping them in <Observer>, see #703. Fixes:
      • componentDidUpdate not being triggered after a reactive render #692
      • The appearance of an additional <Observer> component in the component tree, which complicates shallow testing #699
      • Some regressions in disposeOnUnmount #702
      • Note that dev tool support, and other constraints mentioned in the 6.0.0 release notes have not been restored.
    • The function useStaticRendering(value: boolean): void from mobx-react-lite is now exposed
  • v6.0.4

    June 18, 2019
    • 🛠 Fixed IE 11 compatibility which was accidentally broken. Fixes #698
  • v6.0.3

    June 04, 2019
    • 🛠 disposeOnUnmount now supports initializing it with an array of disposers. Fixes #637 through #641 by @Amareis
    • 🛠 Fixed hoisting of statically declared members. Fixes #678 through #682 by @meabed
  • v6.0.2

    May 30, 2019
    • 🛠 Added missing types for MobXProviderContext, useLocalStore and useAsObservableSource. Fixes #679.
  • v6.0.1

    May 30, 2019
  • v6.0.0

    May 29, 2019

    💥 Breaking changes

    • 👍 The minimal supported version of React is 16.8.0
    • 🗄 Killed the possibility to directly pass store names to observer. Always use inject instead. (This was deprecated for a long time already). observer(["a", "b"], component) should now be written as inject("a", "b")(component).
    • observer components no longer automatically recover from errors (to prevent potential memory leaks). Instead, this is the responsibility of error boundaries.
    • 👀 inject now supports ref forwarding. As such, the .wrappedInstance property has been removed since refs can be used instead. (Fixes #616 (See also #619 by 42shadow42)
    • ⚠ Changing the set of stores in Provider is no longer supported and while throw a hard error (this was a warning before), as the model of Provider / inject has always been designed to inject final values into the tree. (That is, constanted references, the injected objects themselves can be stateful without problem). If you want to dynamically swap what is provided into the tree, use React.createContext instead of Provider / inject. The suppressChangedStoreWarningflag forProvider` has been dropped.
    • The third argument of custom storesToProps functions passed to inject is no longer available.
    • 🗄 <Observer> no longer supports the deprecated inject property.
    • ⚡️ Defining shouldComponentUpdate on observer based components is no longer supported
    • propTypes is no longer exposed, use PropTypes instead
    • 👍 disposeOnUnmount now only supports direct subclasses of React.Component and React.PureComponent. This prevents several unreliable edge cases that silently leaked memory before. Either only extend React.(Pure)Component when using disposeOnUnmount, or manually clean up stuff in componentWillUnmount.
    • 🚚 The onError global error handler has been removed. Use error boundaries instead.
    • 👀 Improved dev tool names for inject wrapped components, see #472 by SimeonC. Fixes #466
    • 🏗 Dropped support for a build of mobx-react that doesn't target either react-dom or react-native. mobx-react doesn't need react-dom to be present, but to make sure your build tools don't fail, you might want to stub react-dom as an empty module.
    • The componentWillReact has been dropped
    • 📦 The MobX-react devtools (either as package or browser plugin) are no longer supported. Instead, the following tools can be analyzed to analyze your mobx-react application:
      • Visualizing re-rendering of components is now part of the standard React devtools
      • The dependency tree of a compent tree can be inspected by showing the state of the useObserver hook in the React devtools (at the time of this release it displays as just Object, but the next iteration of the React devtools will support those properly)
      • Spying on events can still be done with the MobX-react browser plugin, through the mobx-logger package or manually by using the spy or trace utility from the mobx package.

    👌 Improvements

    • 📦 Hook based components are now supported by mobx-react (in fact, the package is now implemented using hooks)
    • Using PureComponent is now recommended for class-based components or React.memo for functional ones.
    • For observer based components, there will now be an additional Observer component in the tree.
    • Two new hooks have been exposed, in case you want to manage local state in observable: useLocalStore and useAsObservableSource.
    • 📦 MobXProviderContext is now exposed from the package, in case you want to consume the context used by Provider with a useContext hook.