Skip to content

Commit 87e03c3

Browse files
committed
update symbol name for dev components
1 parent 70d2b06 commit 87e03c3

4 files changed

Lines changed: 5 additions & 3 deletions

File tree

packages/solid/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export {
2626
getOwner,
2727
runWithOwner,
2828
equalFn,
29-
$HMRCOMP,
29+
$DEVCOMP,
3030
$PROXY
3131
} from "./reactive/signal";
3232
export type {

packages/solid/src/reactive/signal.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { JSX } from "../jsx";
66

77
export const equalFn = <T>(a: T, b: T) => a === b;
88
export const $PROXY = Symbol("solid-proxy");
9-
export const $HMRCOMP = Symbol('solid.js HMR component marker');
9+
export const $DEVCOMP = Symbol('solid-dev-component');
1010
const signalOptions = { equals: equalFn };
1111
let ERROR: symbol | null = null;
1212
let runEffects = runQueue;
@@ -946,7 +946,7 @@ export function resumeEffects(e: Computation<any>[]) {
946946
export function devComponent<T>(Comp: (props: T) => JSX.Element, props: T) {
947947
const c: Partial<Memo<JSX.Element, JSX.Element>> = createComputation<JSX.Element, JSX.Element>(
948948
() => untrack(() => {
949-
Object.assign(Comp, {[$HMRCOMP]: true});
949+
Object.assign(Comp, {[$DEVCOMP]: true});
950950
return Comp(props);
951951
}),
952952
undefined,

packages/solid/src/server/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export {
2525
observable,
2626
from,
2727
$PROXY,
28+
$DEVCOMP,
2829
DEV,
2930
enableExternalSource
3031
} from "./reactive";

packages/solid/src/server/reactive.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { Accessor, Setter } from "../reactive/signal";
33

44
export const equalFn = <T>(a: T, b: T) => a === b;
55
export const $PROXY = Symbol("solid-proxy");
6+
export const $DEVCOMP = Symbol('solid-dev-component');
67
export const DEV = {};
78
const ERROR = Symbol("error");
89

0 commit comments

Comments
 (0)