forked from abner/for-legacy-web
Run prettier on all files.
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
|
||||
import { State } from ".";
|
||||
import { h } from "preact";
|
||||
import { memo } from "preact/compat";
|
||||
import { connect, ConnectedComponent } from "react-redux";
|
||||
|
||||
import { h } from "preact";
|
||||
import { memo } from "preact/compat";
|
||||
|
||||
import { State } from ".";
|
||||
|
||||
export function connectState<T>(
|
||||
component: (props: any) => h.JSX.Element | null,
|
||||
mapKeys: (state: State, props: T) => any,
|
||||
memoize?: boolean
|
||||
component: (props: any) => h.JSX.Element | null,
|
||||
mapKeys: (state: State, props: T) => any,
|
||||
memoize?: boolean,
|
||||
): ConnectedComponent<(props: any) => h.JSX.Element | null, T> {
|
||||
let c = connect(mapKeys)(component);
|
||||
return memoize ? memo(c) : c;
|
||||
let c = connect(mapKeys)(component);
|
||||
return memoize ? memo(c) : c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user