File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -270,15 +270,16 @@ export function createFormHook<
270
270
const form = useForm ( props )
271
271
272
272
const AppForm = useMemo ( ( ) => {
273
- return ( ( { children } ) => {
273
+ const AppForm = ( ( { children } ) => {
274
274
return (
275
275
< formContext . Provider value = { form } > { children } </ formContext . Provider >
276
276
)
277
277
} ) as ComponentType < PropsWithChildren >
278
+ return AppForm
278
279
} , [ form ] )
279
280
280
281
const AppField = useMemo ( ( ) => {
281
- return ( ( { children, ...props } ) => {
282
+ const AppField = ( ( { children, ...props } ) => {
282
283
return (
283
284
< form . Field { ...props } >
284
285
{ ( field ) => (
@@ -302,6 +303,7 @@ export function createFormHook<
302
303
TSubmitMeta ,
303
304
TComponents
304
305
>
306
+ return AppField
305
307
} , [ form ] )
306
308
307
309
const extendedForm = useMemo ( ( ) => {
Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ export function useForm<
193
193
extendedApi . Field = function APIField ( props ) {
194
194
return < Field { ...props } form = { api } />
195
195
}
196
- extendedApi . Subscribe = ( props : any ) => {
196
+ extendedApi . Subscribe = function Subscribe ( props : any ) {
197
197
return (
198
198
< LocalSubscribe
199
199
form = { api }
You can’t perform that action at this time.
0 commit comments