Open audiolion opened 6 years ago
Unfortunately moving to React 16.3 is going to be somewhat painful for Formik because it will introduce another component for each primitive....potentially breaking everyone's enzyme tests. I attempted this move a few weeks ago in a PR with create-react-context
. The problem we are going to need to solve for is that Formik's context provider (<Formik>
) is also a render prop. The current API does not allow that because the <Provider>
it calls React.Children.only()
if I recall.
Obviously React is getting a new Context API, but you have to support more than 16.3 with Formik so you won't be able to use it. I asked Dan Abramov on Twitter and he recommended using React Broadcast to polyfill it for older versions. What about adding this to
formik-effect
/formik
instead of using the old context api? The primary reason is this: