forked from jaredpalmer/formik
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from johnrom/johnrom/formik-core-2
Johnrom/formik core 2
- Loading branch information
Showing
28 changed files
with
172 additions
and
341 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
packages/formik-codemod/tsconfig.json → packages/@formik/codemod/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...@formik/reducer-refs/src/ErrorMessage.tsx → ...ucer-refs/src/components/ErrorMessage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
packages/@formik/reducer-refs/src/components/FastField.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import * as React from 'react'; | ||
import { | ||
GenericFieldHTMLAttributes, | ||
FormikValues, | ||
} from '@formik/core'; | ||
import { FieldConfig, FieldProps } from '../hooks/useField'; | ||
import { Field } from './Field'; | ||
|
||
/** | ||
* @deprecated please use FieldProps (and Field or useField!) | ||
*/ | ||
export type FastFieldProps<V> = FieldProps<V>; | ||
|
||
/** | ||
* @deprecated please use FieldConfig (and Field or useField!) | ||
*/ | ||
export type FastFieldConfig<T> = FieldConfig & { | ||
/** Override FastField's default shouldComponentUpdate */ | ||
shouldUpdate?: ( | ||
nextProps: T & GenericFieldHTMLAttributes, | ||
props: {} | ||
) => boolean; | ||
}; | ||
|
||
/** | ||
* @deprecated please use FieldAttributes (and Field or useField!) | ||
*/ | ||
export type FastFieldAttributes<T> = GenericFieldHTMLAttributes & | ||
FastFieldConfig<T> & | ||
T; | ||
|
||
/** | ||
* @deprecated Please use Field! We promise it is fast now! | ||
*/ | ||
export const FastField = <Value extends FormikValues>( | ||
{ shouldUpdate, ...fieldProps }: FastFieldConfig<Value> | ||
) => <Field {...fieldProps} />; |
Oops, something went wrong.