Releases: jaredpalmer/formik
Releases · jaredpalmer/formik
v1.0.0-alpha.5
What's New
- Added innerRef to
Field
andFastField
if they are string components. - Fix NaN behavior
- Clean up some unused code
- Improve internal TS type signatures
Commits:
- Update links in toc c72281c
- docs: FormikError -> FormikErrors (#589) a56bbc7
- Add isNaN util function instead of Number.isNaN (#588) 3725fd5
- Remove unused private method: isReactNative (#585) ecda967
- Add size-limit to prevent accidental bloat (#528) faabe08
- Add innerRef prop to Field & FastField string components (#580) 0cec09d
- Remove duplicated interfaces (#575) b72382e
- fix issue when the object has a key that is one of the path's parts (#569) 095e915
- Merge branch 'master' of github.com:jaredpalmer/formik 636a670
- Bump site deps 65aae84
- improved validateYupSchema types (#554) 952a084
- fix Arrays example (#550) 164b139
- Fix link to basics 14eb509
- Update api.md 05ac4fe
- Docs (#549) f26590e
v1.0.0-alpha.4
Minor Release
New stuff
- TypeScript 2.8 (#543)
- Dramatically improved
FormikTouched
type signature thanks to conditional types. - There should be more improvements to type signatures coming soon.
- Dramatically improved
- Add
replace
array helper (#520) - Pass in next
initialValues
intoFastField
's reset function (#462) - New ways to use
handleChange
andhandleBlur
(#521)- You can now omit a
name
attribute when using handleChange and handleBlur if you pass them a string as the first argument. They have been modified to return a handler (like Preact'slinkState
helper). The curried handleChange handler also has the flexibility to accept either anevent
OR a string as it's argument--so you can use it with React Native's<TextInput onChangeText/>
too! In other words, you can now do this...
- You can now omit a
// You can now do this....
<input onChange={handleChange('firstName')} value={values.firstName} />
// and in React Native
<TextInput onChangeText={handleChange('firstName')} value={values.firstName} />
Internals
- Added testimonials to docs
- Bumped up deps for TS
- Official types test added
v1.0.0-alpha.3
Minor Release
New Stuff
submitCount
is now tracked by Formik state. More specifically, this tracks submit "attempts." It increments whenever eitherhandleSubmit
orsubmitForm
are called (before Formik looks if there are errors present). It resets to0
when eitherresetForm
orhandleReset
are called. Note: this may be renamedsubmitAttemptCount
in the future.- Updated docs
- Improved build tooling
Commits
- Remove hoistStatics from src 6ca00ad
- Stop bundling external dependencies (#513) 9ec072a
- Fix formatting for Table of Contents header (#425) 6857709
- Improve
FieldArray
example in README (#433) 62f03d1 - Add submitCount to Formik (#477) 89eaf0a
- Call validate method for each step (#508) b29e602
- Update README.md (#501) 5a71a47
- fix: modify conditionals in Guides#Basics in README (#498) e05ca99
- Fix example for Field#validate in README (#482) ee37297
v1.0.0-alpha.2
Patch Release
<FastField>
now updates for external setter callshandleSubmit
now checks for the synthetic event before callingevent.preventDefault()
meaning it can now be used safely in React Native and saving you an arrow function.- Internal refactoring to reduce bundle size
Commits
- Set state of value and error after validateYupSchema sync (#457) 6405d22
- Point to the new .d.ts location eb13945
- Close #448. Make fastfield update for external setter calls fde20a6
- Allow handleSubmit to be called without preventDefault (#451) 12c100b
- rename file formik to Formik (#452) 263befb
- Merge branch 'master' of github.com:jaredpalmer/formik 0ce24e3
- Add travis yarn cache d925c3a
- Update ISSUE_TEMPLATE.md 0a83825
- Update ISSUE_TEMPLATE.md 4f2a092
- Simplify isPromise and add tests (#443) 74d8be4
- Merge branch 'master' of github.com:jaredpalmer/formik 6bce509
- Remove circular exports, shave bytes! 6c3e062
- Fix typo in FieldArray example (#447) d36aa71
v1.0.0-alpha.1
Alpha Release
New Stuff
<FastField>
: This is an optimized version of<Field>
that only re-renders when necessary. More documentation is necessary, but essentially,<FastField>
keeps state locally if possible and then updates the parent<Formik>
state only when the<FastField>
is blurred (i.e. whenonBlur
is fired). The key insight is that 99% of time, only one field is changing at a time in your form. However, if you are doing complex validation wherein one input's value can cause an error in another input,<FastField>
will act like<Field>
and just re-render on each update. Depending on the feedback,<FastField>
may replace<Field>
entirely in the future. Please be gentle.- Curried handleChange and handleBlur: You can now optionally pass a dotpath / name to both
handleChange
andhandleBlur
and they will each return an optimized handler. This works like Preact's linkState mixin. So now you can do
<TextInput onChangeText={handleChange('firstName')} value={values.firstName}/>
in React Native and also just<input onChange={handleChange('firstName')} value={values.firstName}/>
in React DOM. - Curried array helpers: Each array helper provided via
<FieldArray>
(e.g.push('something')
) now also has a curried version of itself (e.g.handlePush('something')
). You can use these to avoid an arrow function inside of render:<button onClick={arrayHelpers.handlePush('')}>Add</button>
v0.11.11
v0.11.10
Breaking change for React Native TypeScript vs. 11.9
- Removed react native types (and GestureResponder type) for
handleChange
. This was causing pain and suffering for regular TypeScript users due to how react-native includes conflicting typings vs@types/node
. 🤷♀️
We will have to make a separate formik-native package or build going forward. Sorry everyone!
v0.11.9
New stuff
- Add new prop
validateOnChange?: boolean
toFieldArray
, default istrue
to trigger validation function after array manipulations - Export
setIn
andgetIn
functions out of utils (undocumented) for power users
Bug fixes
- Add safer calls to array methods in FieldArray
- Add docs about validation gotchas when using FieldArray
Internals
- Rename
dlv
togetIn
- Rename
setDeep
tosetIn
and swap argument order - Update test names
- Add
react-dom
types to dev
v0.11.8
Patch Release
- Tweak TypeScript typings of
FormikTouched
so that it fully supports deeply nested forms. This fix is temporary and will be further improved when TypeScript 2.8 comes out in March and we can use the new conditional types. Thank you @weswigham for the help!
v0.11.7
Broken install. DO NOT USE.