Skip to content

v0.5.0

Latest
Compare
Choose a tag to compare
@zalmoxisus zalmoxisus released this 06 Oct 13:41
· 63 commits to master since this release

Pausing and locking features

Read the post for details about why and how to use them.

pausing

Added composeWithDevtools method

Instead of

import { createStore, applyMiddleware, compose } from 'redux';
import devToolsEnhancer from 'remote-redux-devtools';

const store = createStore(reducer, /* preloadedState, */ compose(
    applyMiddleware(...middleware),
    devToolsEnhancer()
));

Now you should use:

  import { createStore, applyMiddleware } from 'redux';
  import { composeWithDevTools } from 'remote-redux-devtools';

  const store = createStore(reducer, /* preloadedState, */ composeWithDevTools(
    applyMiddleware(...middleware),
    // other store enhancers if any
  ));

or with parameters:

  import { createStore, applyMiddleware } from 'redux';
  import { composeWithDevTools } from 'remote-redux-devtools';

  const composeEnhancers = composeWithDevTools({ realtime: true, port: 8000 });
  const store = composeWithDevTools(reducer, /* preloadedState, */ composeEnhancers(
    applyMiddleware(...middleware),
    // other store enhancers if any
  ));

As the result DevTools.updateStore is deprecated.

New options

  • shouldRecordChanges (boolean) - if specified as false, it will not record the changes till clicking on Start recording button. Default is true.
  • pauseActionType (string) - if specified, whenever clicking on Pause recording button and there are actions in the history log, will add this action type. If not specified, will commit when paused. Default is @@PAUSED.
  • shouldStartLocked (boolean) - if specified as true, it will not allow any non-monitor actions to be dispatched till clicking on Unlock changes button. Default is false.
  • shouldHotReload boolean - if set to false, will not recompute the states on hot reloading (or on replacing the reducers). Default to true.