jaredpalmer / formik

Build forms in React, without the tears 😭
https://formik.org
Apache License 2.0
33.91k stars 2.78k forks source link

Update withFormik.tsx #3772

Closed ravshansbox closed 1 year ago

ravshansbox commented 1 year ago

React 18 does not contain StatelessComponent type anymore.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
formik-docs ❌ Failed (Inspect) May 6, 2023 3:18pm
Philipp91 commented 1 year ago

While I can't comment on these CI failures, I'm generally in favor of this change. Currently, whenever I npm install, I need to manually open up withFormik.d.ts and make this change to get things to work. The workarounds in #3546 mess things up for me (making TypeScript believe that React now only contains StatelessComponent and nothing else, leading to millions of errors), so I'd appreciate this proper fix here being released.

ravshansbox commented 1 year ago

@Philipp91 you can work around this issue by adding skipLibCheck: true to tsconfig.json