question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to import Form in formik@2.0.1-rc.7

See original GitHub issue

🐛 Bug report

Current Behavior

Got an error when trying to import Form component from fomik package. Like this:

import { Formik, Form } from 'formik';
semantic error TS2305 Module '"../node_modules/formik/dist"' has no exported member 'Form'.

Expected behavior

In previous version We have an ability to import Form from formik package

Additional context

For some reason in generated types we have export default Form; Screen Shot 2019-06-23 at 1 11 54 PM

Your environment

Software Version(s)
Formik 2.0.1-rc.7
React 16.8.6
TypeScript 3.5.1
Operating System macOS 10.14.5

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:12
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
meredithlindcommented, Jul 9, 2019

Typescript 3.5.3 is released and fixes this issue 🎉

See microsoft/TypeScript#31676

1reaction
jaredpalmercommented, Jul 9, 2019

Going to deprecate that release and rebuild with 3.5.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrating from v1.x to v2.x
With Formik 2, we introduced the new props for more initial state: initialErrors , initialTouched , initialStatus . Therefore, resetForm 's signature has ......
Read more >
Formik v2 useFormikContext()
Formik v2 useFormikContext(). An example form built with Formik to demonstrate how v2 binds initialValues to <Field type="checkbox" />.
Read more >
Error while importing Formik type in formik v2
I got a typescript problem while importing Formik when I updated formik from v1 to v2. With v1 I used to use this...
Read more >
setfieldvalue formik - You.com | The AI Search Engine ...
Describe the bug When using setFieldValue , the isValid and errors props in the form component will be not be updated until the...
Read more >
Form: Formik V2
[Try to understand] onSubmit={formik.handleSubmit}, onSubmit and <Button type=”submit”/> on how to submit html form. import React from ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found