hazelcast / hive

Design system built with A11Y in mind
Apache License 2.0
18 stars 4 forks source link

Better way to get Fomik form values #64

Open aigoncharov opened 4 years ago

aigoncharov commented 4 years ago

Currently, we pass a ref to the Formik component explicitly. That ref is being assigned to FormikProps. We need a helper getFormikProps which accepts a ReactWrapper (provided by enzyme) pointing to Formik component, and return FormikProps. The usage should be:

const wrapper = mount(...)
const formikProps = getFormikProps(wrapper.find(Formik))

Ideas: Figure out how to get value from a context provider outside of its child tree.

pawelklasa commented 3 years ago

There's already a solution for MC @Sodik