Skip to content

Commit

Permalink
improve devtool
Browse files Browse the repository at this point in the history
  • Loading branch information
MrWangJustToDo committed Nov 14, 2023
1 parent 03f4342 commit fe59f33
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/r-store/src/state/_internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { withActions, withNamespace, withPersist } from "./middleware";
import { getFinalActions, getFinalNamespace, getFinalState } from "./tools";

import type { Setup } from "./createState";
import type { MaybeStateWithMiddleware, WithActionsProps , UnWrapMiddleware } from "./tools";
import type { MaybeStateWithMiddleware, WithActionsProps, UnWrapMiddleware } from "./tools";

/**
* @internal
Expand All @@ -37,7 +37,7 @@ export function internalCreateState<T extends Record<string, unknown>, P extends
}

if (option?.withNamespace) {
creator = withNamespace(creator, { namespace: option.withNamespace });
creator = withNamespace(creator, { namespace: option.withNamespace, reduxDevTool: true });
}

const lifeCycle = createLifeCycle();
Expand Down Expand Up @@ -69,7 +69,9 @@ export function internalCreateState<T extends Record<string, unknown>, P extends

if (__DEV__) {
const sameField = checkHasSameField(rawState, actions);
sameField.forEach((key) => console.warn(`[reactivity-store] duplicate key: [${key}] in 'state' and 'actions' from createState, this is a unexpected usage`));
sameField.forEach((key) =>
console.warn(`[reactivity-store] duplicate key: [${key}] in 'state' and 'actions' from createState, this is a unexpected usage`)
);
}

if (__DEV__ && namespace.reduxDevTool && !isServer) {
Expand Down

0 comments on commit fe59f33

Please sign in to comment.