Skip to content

Commit d9cdbcb

Browse files
update type
1 parent 2f2f7fa commit d9cdbcb

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

packages/r-store/index.d.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ export declare const createStore: <T extends Record<string, unknown>>(creator: C
6868
/**
6969
* @public
7070
* @deprecated
71-
* new version of React 'StrictMode' cause lifeCycle function not work as expect
72-
* try to disable `StrictMode` to fix this issue
71+
* not recommend to use this function, use `createStore` instead
7372
*/
7473
export declare function createStoreWithComponent<T extends Record<string, unknown>>(props: CreateStoreWithComponentProps<NonNullable<unknown>, T>): ({ children }: {
7574
children?: (p: DeepReadonly<UnwrapNestedRefs<T>>) => ReactNode;
@@ -78,8 +77,7 @@ export declare function createStoreWithComponent<T extends Record<string, unknow
7877
/**
7978
* @public
8079
* @deprecated
81-
* new version of React 'StrictMode' cause lifeCycle function not work as expect
82-
* try to disable `StrictMode` to fix this issue
80+
* not recommend to use this function, use `createStore` instead
8381
*/
8482
export declare function createStoreWithComponent<P extends Record<string, unknown>, T extends Record<string, unknown>>(props: CreateStoreWithComponentProps<P, T>): ({ children }: {
8583
children?: (p: P & DeepReadonly<UnwrapNestedRefs<T>>) => ReactNode;

packages/r-store/src/store/createStoreWithComponent.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,24 @@ export type CreateStoreWithComponentProps<P extends Record<string, unknown>, T e
2121
// TODO
2222
/**
2323
* @public
24-
* @deprecated
25-
* new version of React 'StrictMode' cause lifeCycle function not work as expect
26-
* try to disable `StrictMode` to fix this issue
24+
* @deprecated
25+
* not recommend to use this function, use `createStore` instead
2726
*/
2827
export function createStoreWithComponent<T extends Record<string, unknown>>(
2928
props: CreateStoreWithComponentProps<NonNullable<unknown>, T>
3029
): ({ children }: { children?: (p: DeepReadonly<UnwrapNestedRefs<T>>) => ReactNode }) => ReactElement;
3130
/**
3231
* @public
3332
* @deprecated
34-
* new version of React 'StrictMode' cause lifeCycle function not work as expect
35-
* try to disable `StrictMode` to fix this issue
33+
* not recommend to use this function, use `createStore` instead
3634
*/
3735
export function createStoreWithComponent<P extends Record<string, unknown>, T extends Record<string, unknown>>(
3836
props: CreateStoreWithComponentProps<P, T>
3937
): ({ children }: { children?: (p: P & DeepReadonly<UnwrapNestedRefs<T>>) => ReactNode } & P) => ReactElement;
4038
/**
4139
* @public
4240
* @deprecated
43-
* new version of React 'StrictMode' cause lifeCycle function not work as expect
44-
* try to disable `StrictMode` to fix this issue
41+
* not recommend to use this function, use `createStore` instead
4542
*/
4643
export function createStoreWithComponent<P extends Record<string, unknown>, T extends Record<string, unknown>>(props: CreateStoreWithComponentProps<P, T>) {
4744
const { setup, render } = props;

0 commit comments

Comments
 (0)