mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-12-01 14:03:52 +03:00
Export liftAction, liftReducerWith, and unliftState from instrument.js
This commit is contained in:
parent
9713bd2a01
commit
e49a56b2c1
|
@ -131,14 +131,14 @@ function recomputeStates(
|
||||||
/**
|
/**
|
||||||
* Lifts an app's action into an action on the lifted store.
|
* Lifts an app's action into an action on the lifted store.
|
||||||
*/
|
*/
|
||||||
function liftAction(action) {
|
export function liftAction(action) {
|
||||||
return ActionCreators.performAction(action);
|
return ActionCreators.performAction(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a history state reducer from an app's reducer.
|
* Creates a history state reducer from an app's reducer.
|
||||||
*/
|
*/
|
||||||
function liftReducerWith(reducer, initialCommittedState, monitorReducer) {
|
export function liftReducerWith(reducer, initialCommittedState, monitorReducer) {
|
||||||
const initialLiftedState = {
|
const initialLiftedState = {
|
||||||
monitorState: monitorReducer(undefined, {}),
|
monitorState: monitorReducer(undefined, {}),
|
||||||
nextActionId: 1,
|
nextActionId: 1,
|
||||||
|
@ -300,7 +300,7 @@ function liftReducerWith(reducer, initialCommittedState, monitorReducer) {
|
||||||
/**
|
/**
|
||||||
* Provides an app's view into the state of the lifted store.
|
* Provides an app's view into the state of the lifted store.
|
||||||
*/
|
*/
|
||||||
function unliftState(liftedState) {
|
export function unliftState(liftedState) {
|
||||||
const { computedStates, currentStateIndex } = liftedState;
|
const { computedStates, currentStateIndex } = liftedState;
|
||||||
const { state } = computedStates[currentStateIndex];
|
const { state } = computedStates[currentStateIndex];
|
||||||
return state;
|
return state;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user