Skip to content

Commit e317116

Browse files
committed
Prevent different versions of react from having different descriptions, which can be replaced with any
1 parent 3a2cc29 commit e317116

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/store/utils.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { SchedulerType } from "../scheduler/types";
77
import type { ListenerType } from "../subscribe/types";
88
import type { StateRestoreAccomplishedMapType, InitialFnCanExecMapType } from "../restore/types";
99
import useSyncExternalStoreExports from "use-sync-external-store/shim";
10-
import React, { type ReactNode, memo } from "react";
10+
import React, { memo } from "react";
1111
import { initialStateRetrieve, deferRestoreProcessing } from "../restore";
1212
import { batchUpdate } from "../static";
1313
import { __CLASS_STATE_REF_SET_KEY__ } from "../classConnect/static";
@@ -341,7 +341,8 @@ export const hookSignal = <S extends PrimitiveState>(
341341
* to indirectly invoke useState by reading data properties through engineStore,
342342
* achieving a componentized return result.
343343
*/
344-
(value as AnyFn).bind(engineStore, ...Object.values(props))() as ReactNode
344+
// Prevent different versions of react from having different descriptions, which can be replaced with any
345+
(value as AnyFn).bind(engineStore, ...Object.values(props))() as any
345346
));
346347

347348
const { AnyHookCompMemo } = value;
@@ -372,7 +373,8 @@ export const classSignal = <S extends PrimitiveState>(value: ValueOf<S>, store:
372373
> {
373374
store = this.connectStore(store);
374375
render() {
375-
return (value as AnyFn).bind(this.store, ...Object.values(this.props))() as ReactNode;
376+
// Prevent different versions of react from having different descriptions, which can be replaced with any
377+
return (value as AnyFn).bind(this.store, ...Object.values(this.props))() as any;
376378
}
377379
};
378380

0 commit comments

Comments
 (0)