mirror of
https://github.com/LukeHagar/form.git
synced 2025-12-07 04:19:45 +00:00
fix: several type and build errors and fix example type inference (#399)
* fix few type errors and fix example * couple fixes * fix babel
This commit is contained in:
@@ -57,7 +57,7 @@ export function useForm<TData>(opts?: FormOptions<TData>): FormApi<TData> {
|
||||
selector,
|
||||
) => {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
return useStore(api.store, selector) as any
|
||||
return useStore(api.store as any, selector as any) as any
|
||||
}
|
||||
api.Subscribe = (
|
||||
// @ts-ignore
|
||||
@@ -66,7 +66,7 @@ export function useForm<TData>(opts?: FormOptions<TData>): FormApi<TData> {
|
||||
return functionalUpdate(
|
||||
props.children,
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
useStore(api.store, props.selector),
|
||||
useStore(api.store as any, props.selector as any),
|
||||
) as any
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user