@plasius/react-state 1.2.12 → 1.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +3 -4
- package/dist/index.d.ts +3 -4
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as react from 'react';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import react__default, { ReactNode } from 'react';
|
|
4
3
|
|
|
5
4
|
type Reducer<S, A> = (state: S, action: A) => S;
|
|
6
5
|
type Listener = () => void;
|
|
@@ -35,7 +34,7 @@ declare function createScopedStoreContext<S extends IState, A extends IAction>(r
|
|
|
35
34
|
Provider: ({ children, initialState: override, }: {
|
|
36
35
|
children: React.ReactNode;
|
|
37
36
|
initialState?: S;
|
|
38
|
-
}) =>
|
|
37
|
+
}) => react.JSX.Element;
|
|
39
38
|
useStore: () => S;
|
|
40
39
|
useDispatch: () => ((action: A) => void);
|
|
41
40
|
useSelector: <T>(selector: (state: S) => T, isEqual?: (a: T, b: T) => boolean) => T;
|
|
@@ -45,7 +44,7 @@ interface StoreProviderProps<S extends IState, A extends IAction> {
|
|
|
45
44
|
store: Store<S, A>;
|
|
46
45
|
children: ReactNode;
|
|
47
46
|
}
|
|
48
|
-
declare function StoreProvider<S extends IState, A extends IAction>({ store, children, }: StoreProviderProps<S, A>):
|
|
47
|
+
declare function StoreProvider<S extends IState, A extends IAction>({ store, children, }: StoreProviderProps<S, A>): react__default.JSX.Element;
|
|
49
48
|
declare function useStore<S extends IState>(): S;
|
|
50
49
|
declare function useDispatch<A extends IAction>(): Store<IState, A>["dispatch"];
|
|
51
50
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as react from 'react';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import react__default, { ReactNode } from 'react';
|
|
4
3
|
|
|
5
4
|
type Reducer<S, A> = (state: S, action: A) => S;
|
|
6
5
|
type Listener = () => void;
|
|
@@ -35,7 +34,7 @@ declare function createScopedStoreContext<S extends IState, A extends IAction>(r
|
|
|
35
34
|
Provider: ({ children, initialState: override, }: {
|
|
36
35
|
children: React.ReactNode;
|
|
37
36
|
initialState?: S;
|
|
38
|
-
}) =>
|
|
37
|
+
}) => react.JSX.Element;
|
|
39
38
|
useStore: () => S;
|
|
40
39
|
useDispatch: () => ((action: A) => void);
|
|
41
40
|
useSelector: <T>(selector: (state: S) => T, isEqual?: (a: T, b: T) => boolean) => T;
|
|
@@ -45,7 +44,7 @@ interface StoreProviderProps<S extends IState, A extends IAction> {
|
|
|
45
44
|
store: Store<S, A>;
|
|
46
45
|
children: ReactNode;
|
|
47
46
|
}
|
|
48
|
-
declare function StoreProvider<S extends IState, A extends IAction>({ store, children, }: StoreProviderProps<S, A>):
|
|
47
|
+
declare function StoreProvider<S extends IState, A extends IAction>({ store, children, }: StoreProviderProps<S, A>): react__default.JSX.Element;
|
|
49
48
|
declare function useStore<S extends IState>(): S;
|
|
50
49
|
declare function useDispatch<A extends IAction>(): Store<IState, A>["dispatch"];
|
|
51
50
|
|