@@ -13,7 +13,6 @@ import {
1313 FieldHelperProps ,
1414 FieldInputProps ,
1515 FormikHelpers ,
16- FormikContextType ,
1716} from './types' ;
1817import {
1918 isFunction ,
@@ -29,7 +28,6 @@ import {
2928import { FormikProvider } from './FormikContext' ;
3029import invariant from 'tiny-warning' ;
3130import { LowPriority , unstable_runWithPriority } from 'scheduler' ;
32- import { FormikBag } from './withFormik' ;
3331
3432type FormikMessage < Values > =
3533 | { type : 'SUBMIT_ATTEMPT' }
@@ -996,15 +994,15 @@ export function useFormik<Values extends FormikValues = FormikValues>({
996994 return ctx ;
997995}
998996
999- export const Formik = React . forwardRef ( <
997+ export function Formik <
1000998 Values extends FormikValues = FormikValues ,
1001999 ExtraProps = { }
1002- > ( props : FormikConfig < Values > & ExtraProps , ref : React . Ref < FormikContextType < Values > > ) => {
1000+ > ( props : FormikConfig < Values > & ExtraProps ) {
10031001 const formikbag = useFormik < Values > ( props ) ;
1004- const { component, children, render } = props ;
1002+ const { component, children, render, innerRef } = props ;
10051003
10061004 // This allows folks to pass a ref to <Formik />
1007- React . useImperativeHandle ( ref , ( ) => formikbag ) ;
1005+ React . useImperativeHandle ( innerRef , ( ) => formikbag ) ;
10081006
10091007 React . useEffect ( ( ) => {
10101008 if ( __DEV__ ) {
@@ -1032,10 +1030,7 @@ export const Formik = React.forwardRef(<
10321030 : null }
10331031 </ FormikProvider >
10341032 ) ;
1035- } ) as <
1036- Values extends FormikValues = FormikValues ,
1037- ExtraProps = { }
1038- > ( props : FormikConfig < Values > & ExtraProps & React . RefAttributes < FormikContextType < Values > > ) => JSX . Element ;
1033+ }
10391034
10401035function warnAboutMissingIdentifier ( {
10411036 htmlContent,
0 commit comments