React 17 type issue
When I try to use tanstack form in a existing project that uses the latest versions of react 17 and it's types, I'm getting back:
5 Replies
optimistic-gold•3w ago
seems like react FCs were stricter in React 17 than React 18
that's a problem ... if we narrowed it to
JSX.Element | null
, that'd be a breaking change for React 18 users. But this seems like it's going to cause lots of TypeScript errors in React 17grumpy-cyanOP•3w ago
It does cause a lot of errors, even for form.Subscribe too. One of the projects my team and I are working is migrating to Tanstack Form, and we are currently stuck on React 17. We've been having to use
@ts-ignore
to get around our linting, but it is less than ideal 🙁flat-fuchsia•3w ago
You could override our types using a
declare module
.d.ts
file
It'd be more code, but better than @ts-ignore
grumpy-cyanOP•3w ago
What might this
d.ts
look like to make this work? 🤔 That sounds like a much better optionflat-fuchsia•3w ago