Skip to content

2.0.0

Compare
Choose a tag to compare
@imevro imevro released this 25 Sep 05:35
· 223 commits to master since this release

It's time to drop support for old deprecated applyMiddleware(logger) without options! πŸŽ‰

Breaking changes

  • support for old logger is dropped, so now redux-logger supports only createLogger() with options

  • actions now transforms via actionTransformer, so if you have, for example, action type as Symbol, you need write your own function which returns action with action.type as String.

    const logger = createLogger({
      actionTransformer: (action) => {
        return Object.assign({}, action, {
          type: String(action.type),
        });
      },
    });
    
    const store = applyMiddleware(logger)

Changelog

  • actionTransformer (#31, #33), function which transforms action before logging (for example, Symbol β†’ String or convert Immutable.js to plain JS object

  • umd builds in /dist/index.js and /dist/index.min.js with name reduxLogger

    <script src="/redux-logger/dist/index.js"></script>
    <script>
      const logger = reduxLogger({
        duration: true,
        collapsed: true,
      });
    </script>

    I don't know, maybe somebody needs it.

  • createLogger() now fully documented using JSDoc

  • README updated too

  • updated packages in example

  • also updated example for latest best practices (for example, switched from deprecated react-hot-loader to react-transform and react-transform-hmr), so if you starter in webpack, react or redux, check out it, because now that tiny example is more useful than ever.