mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: typed redux
This commit is contained in:
1 parent
e0f38fb0a8
commit
99b6ead86f
6 files changed
+4
-1
No files matched your search
File renamed without changes.
+1
@@ -12,3 +12,4 @@ const reducer = combineReducers({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export default reducer;
|
export default reducer;
|
||||||
|
export type RootState = ReturnType<typeof reducer>;
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+3
-1
@@ -1,4 +1,6 @@
|
|||||||
export default async function loadReactRedux(storeReducer) {
|
import { Action, AnyAction, Reducer } from 'redux';
|
||||||
|
|
||||||
|
export default async function loadReactRedux<S, A extends Action = AnyAction>(storeReducer: Reducer<S, A>) {
|
||||||
const React = await import('react');
|
const React = await import('react');
|
||||||
const { render, unmountComponentAtNode } = await import('react-dom');
|
const { render, unmountComponentAtNode } = await import('react-dom');
|
||||||
const { Provider } = await import('react-redux');
|
const { Provider } = await import('react-redux');
|
||||||
Reference in new issue
Block a user