How to use the redux-undo.ActionCreators.redo function in redux-undo

To help you get started, we’ve selected a few redux-undo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apache / incubator-superset / superset / assets / spec / javascripts / dashboard / actions / dashboardLayout_spec.js View on Github external
it('should dispatch a redux-undo .redo() action ', () => {
      const { getState, dispatch } = setup();
      const thunk = redoLayoutAction();
      thunk(dispatch, getState);

      expect(dispatch.getCall(0).args[0]).toEqual(UndoActionCreators.redo());

      // redo/undo should trigger action for dashboardFilters
      expect(dashboardFilters.updateLayoutComponents.callCount).toEqual(1);
    });
github wonderunit / storyboarder / src / js / xr / src / use-interactions-manager.js View on Github external
const onPressEndB = event => {
    // to relay through state machine instead:
    // interactionService.send({ type: 'PRESS_END_B', controller: event.target })

    if (canRedo && interactionService.state.value !== "character_posing") {
      dispatch(ActionCreators.redo())
      playSound('redo')
    }
  }
github mojs / mojs-curve-editor / app / js / tags / curve-editor.babel.jsx View on Github external
_onKeyUp (e) {
    const {store} = this.context;
    const {controls} = this._state;
    // don't react on shortcuts if inactive or minimized
    if (!controls.isActive || controls.isMinimize) { return; }
    // don't react if `alt` key is not set
    if ( !e.altKey ) { return; }
    switch (e.which) {
      // z
      case 90: { return store.dispatch(ActionCreators.undo()); }
      // x
      case 88: { return store.dispatch(ActionCreators.redo()); }
      // d
      case 68: { return store.dispatch({ type: 'POINT_DELETE' }); }
      // \
      case 220: { return e.shiftKey && this._tryToReset(store); }
    }
  }
github ging / ediphy / _editor / containers / EditorApp.jsx View on Github external
                        redo={() => {this.dispatchAndSetState(ActionCreators.redo());}}
                        visor={() =>{this.setState({ visorVisible: true });}}
github joker1007 / blackalbum / src / containers / root.js View on Github external
historyForward() {
    let { dispatch } = this.props;
    dispatch(ActionCreators.redo());
  }
github mickeyjsx / mickey / examples / counter-undo / src / App.jsx View on Github external
      <button> props.dispatch(ActionCreators.redo())}&gt;Redo</button>
github anthonydugois / polynom / web_modules / Project / index.js View on Github external
redo() {
    dispatch(undoActions.redo())
  },
  clearHistory() {
github woodenconsulting / react-js-diagrams / demos / demo4 / demo4.js View on Github external
  onRedo: () => dispatch(UndoActionCreators.redo())
});

redux-undo

simple undo/redo functionality for redux state containers

MIT
Latest version published 1 year ago

Package Health Score

62 / 100
Full package analysis