UNPKG

spud-framework

Version:

Spud framework is a lightweight, strongly-typed, and declarative way to minimize boilerplate while using [thunks](https://github.com/reduxjs/redux-thunk) with [redux](https://react-redux.js.org/) for asynchronous actions, implemented as a [hook](https://r

7 lines (6 loc) 638 B
import React from 'react'; import { AsyncReducerState, AsyncHOCActions, ActionSchemaProps } from './types'; declare const AsyncHOC: <T, A, E, D, N, ASP extends ActionSchemaProps<N, T, A, E, D>, AHA extends AsyncHOCActions<ASP, N, T, A, E, D>, ARS extends AsyncReducerState<ASP, N, T, A, E, D>>(actions: ASP) => <OP extends object>(Component: (props: OP & { actions: AHA; }) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | null) => React.FC<OP>; export default AsyncHOC;