Skip to content

Latest commit

 

History

History
169 lines (109 loc) · 7.75 KB

CHANGELOG.md

File metadata and controls

169 lines (109 loc) · 7.75 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog.

Unreleased

Nothing!

[0.9.1] – 2020-07-23

Added

  • (actions): Added makePayloadMetaActionCreator.
  • (actions): Added invariant to action creator factories which checks that the type is a non-empty string.
  • (actions): Added invariant to makePayloadActionCreator and makeEmptyActionCreator for checking the correct number of arguments.
  • (injectors-react): Added isNamespaced prop for all injector hooks and decorators. Use this option to indicate that an injectable must always be injected under a namespace.
  • (injectors-react): It is now possible to reliably inject functions, arrays, and complex objects.
  • (middleware): Added composeMiddleware.
  • (namespaces): Added preventNamespace, which always overwrites the original namespace with a "global" namespace.
  • (namespaces): Added getStateByAction and getStateByNamespace which always use the default feature.
  • (namespaces-react): New package! Existing logic from various packages has been moved here (useNamespace, NamespaceProvider and namespacedConnect).
  • (namespaces-react): withNamespaceProvider can now be used to create complex multi-instance components more easily.
  • (namespaces-react): Added useNamespacedDispatch and useNamespacedSelector hooks.
  • (reducers): makeReducer now supports arrays of strings and predicates.
  • (reducers): It is now possible to inject deep reducer structures, allowing for view-based state management.

Changed

  • (actions): makeConstantActionCreator has been renamed to makeEmptyActionCreator (original export still present).
  • (actions): Changed signatures of makePayloadActionCreator and makeEmptyActionCreator.
  • (actions): makeSimpleActionCreator has been renamed to makePayloadActionCreator (original export still present).
  • (actions): makeActionCreator has been renamed to configureActionCreator.
  • (actions): makeReducer has been moved to the @redux-tools/reducers package.
  • (injectors-react): Provider has been renamed to NamespaceProvider.
  • (injectors-react): It is no longer necessary to pass isGlobal: true when not using the namespacing mechanism.
  • (namespaces): Renamed getStateByAction and getStateByNamespace to getStateByFeatureAndAction and getStateByFeatureAndNamespace.
  • (namespaces-react): useNamespace no longer falls back to DEFAULT_FEATURE if no namespace could be resolved.
  • (react): The unpkg bundle now includes all dependencies except for React, Redux, and React Redux.
  • (reducers): makeReducer now uses the default reducer for error actions if the error reducer is missing.
  • (reducers): getStateByAction and getStateByNamespace have been moved to the @redux-tools/namespaces package.

Fixed

  • (injectors-react): Static namespace and feature in decorators is no longer passed down to inner components.
  • (namespaces-react): Static namespace and feature in namespacedConnect is no longer passed down to inner components.

Removed

  • The unpkg bundle is no longer created for non-preset packages.

[0.9.0] – 2020-07-23

Oops.

[0.8.2] – 2020-03-05

Fixed

  • ramda and ramda-extension dependency versions are now less strict.
  • All transitive peer dependencies are now listed in the appropriate packages.

[0.8.1] – 2020-03-05

Fixed

  • (reducers): Reducer state is no longer cleaned up if an equal entry is still injected.

[0.8.0] – 2020-02-28

Added

  • redux-tools.js.org ❤️
  • (react): New package! @redux-tools/react reexports everything necessary to get started with Redux Tools in a React application.
  • (reducers): Enhancer now supports initial reducers.

[0.7.0] – 2020-01-10

Fixed

  • Appropriate dependencies added to useEffect in injection hooks.
  • (middleware): Injected middleware are now properly called in the order of injection.
  • (reducers): Existing state keys are now preserved to allow preloading of global state.
  • (reducers): Clean up reducer state after ejection.

[0.6.0] – 2019-08-06

Added

  • (namespaces): Added attachNamespace, which always overwrites the original namespace.
  • (middleware): Middleware now automatically sets the namespace of each dispatched action.
  • (middleware): getNamespacedState and namespace are now available in the first argument in all injected middleware.

Changed

  • (namespaces): Renamed attachNamespace to defaultNamespace.

Fixed

  • (middleware): Injected middleware are now properly called in the order of injection.
  • (middleware): Middleware no longer automatically sets the namespace of each action via next().

Removed

  • (namespaces): Unnecessary utility functions (attachFeature and getFeatureByAction).

[0.5.0] – 2019-05-31

Added

  • Hook-based API. You can now use useMiddleware, useEpics and useReducers with a caveat: don't dispatch any actions until the injectables are injected (based on hook return value). Hooks are also used under the hood for better structure and performance.
  • Loads of new useful warnings when injecting and ejecting.
  • You can now define namespaces and features statically (or using props) in withMiddleware, withEpics and withReducers.
  • You can now inject functions in addition to objects. Note that a function (reducer, middleware or epic) will only be initialized once per namespace/feature.
  • Support for Redux Thunk! Just use our clone instead of the official implementation to enable automatic namespace passthrough via thunks.
  • (reducers): Support for features! This allows using Redux Tools with a feature-based state structure, similar to when using e.g. Redux Form.
  • (reducers-react): Warn when using withReducers with global: false and no namespace.

Changed

  • The injection API was changed from (injectables, namespace, version) to (injectables, { namespace, feature }).
  • All the enhancer exports were changed to makeEnhancer because of ambiguity in the injectable middleware enhancer.
  • Loads of internal refactoring under the hood to reduce duplicate code and improve tests maintainability.
  • global and persist options in decorators were renamed to isGlobal and isPersistent.
  • (middleware): Injectable middleware enhancer now has an injectedMiddleware property, which you must use to signify the execution point of the middleware.

Fixed

  • (middleware): Correctly skip duplicate middleware.

[0.4.0] – 2019-02-07

Added

  • (reducers): The reducer passed to createStore() as the first argument is now composed with the injected reducers.
  • Support for injectable middleware! See the middleware and middleware-react packages.

Fixed

  • (injectors-react): Performance optimizations in <InjectorContext.Consumer />.

[0.3.0] – 2019-01-09

Added

  • Documentation, including the README.md and FAQ.md files.
  • (actions): makeActionTypes as an export of prefixedValueMirror from the utils package.

Fixed

  • (utils): getDisplayName function now handles strings.
  • (injectors-react): Now compatible with react-redux v6.

[0.2.0] - 2018-11-29

Added

  • This changelog!

Changed

  • (epics): streamCreators property has been renamed to streamCreator and now accepts a function instead of an array.
  • (injectors-react): <Provider /> is now a separate component which accepts store, withNamespace and namespace props directly. It also allows for seamless nesting (no need to always provide all properties).

Fixed

  • The injection mechanism now supports React async rendering.
  • (reducers): Reducers now filter actions by namespace properly.