File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export {
2626 getOwner ,
2727 runWithOwner ,
2828 equalFn ,
29+ $HMRCOMP ,
2930 $PROXY
3031} from "./reactive/signal" ;
3132export type {
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import type { JSX } from "../jsx";
66
77export const equalFn = < T > ( a : T , b : T ) => a === b ;
88export const $PROXY = Symbol ( "solid-proxy" ) ;
9+ export const $HMRCOMP = Symbol ( 'solid.js HMR component marker' ) ;
910const signalOptions = { equals : equalFn } ;
1011let ERROR : symbol | null = null ;
1112let runEffects = runQueue ;
@@ -944,7 +945,10 @@ export function resumeEffects(e: Computation<any>[]) {
944945// Dev
945946export function devComponent < T > ( Comp : ( props : T ) => JSX . Element , props : T ) {
946947 const c : Partial < Memo < JSX . Element , JSX . Element > > = createComputation < JSX . Element , JSX . Element > (
947- ( ) => untrack ( ( ) => Comp ( props ) ) ,
948+ ( ) => untrack ( ( ) => {
949+ Object . assign ( Comp , { [ $HMRCOMP ] : true } ) ;
950+ return Comp ( props ) ;
951+ } ) ,
948952 undefined ,
949953 true
950954 ) ;
You can’t perform that action at this time.
0 commit comments