zodios-react icon indicating copy to clipboard operation
zodios-react copied to clipboard

Type instantiation is excessively deep and possibly infinite

Open moonrailgun opened this issue 11 months ago • 3 comments

image

typescipt always report error special in this scene

moonrailgun avatar Mar 07 '24 08:03 moonrailgun

@moonrailgun Try using getKeyByPath() instead. This solved the problem for us, see https://github.com/ecyrbe/zodios/issues/505#issuecomment-1683708771.

Unfortunately, Zodios starts to feel like abandonware to me, because there haven't been any updates for over half a year now. It's in a good state, but I feel like there's something inherently wrong with the type inference leading to (sometimes only sporadic) type errors. IMHO, this makes this otherwise awesome library feel kind of … brittle, I guess?

And I'd really like to finally update all my Zodios projects to react-query@v5. @ecyrbe promised to make this happen, but I'm starting to worry we're not gonna see any updates… 😢

soulchild avatar Mar 26 '24 08:03 soulchild

oh, thanks for your reply, @soulchild . i never use getKeyByPath because i wanna make unify with my source code.

i think zodios's infer chain is too big and dont make typescript happy. after i use it after with 100+ endpoint....

and i found i still using [email protected]. its why i dont feel it has problem. Is any epic change in [email protected] which let you wanna use it?

moonrailgun avatar Mar 26 '24 08:03 moonrailgun

and i found i still using [email protected]. its why i dont feel it has problem. Is any epic change in [email protected] which let you wanna use it?

Nah, not really. 😉 But I like having my dependencies as up to date as possible and not leave them falling behind.

I'm more worried that there haven't been ANY updates to the Zodios ecosystem in quite a long time.

soulchild avatar Mar 26 '24 09:03 soulchild