Closed pckilgore closed 9 months ago
Can you please share a code reproduction?
I can fix by upgrading @xstate/react to 4.0.2. Repro by reverting to 4.0.1
Can you please share a code reproduction?
wow, what a pain.
You might want to add a note in the template that with new packages in codesandbox, you have to manually install the right version of the package using the codesandbox internal terminal and yarn cli, not the UI, which won't do it (I assume because of newness, at least).
Repro: TS playground.
It's not great that the compatibility between xstate@5.5.0
and @xstate/react@4.0.1
has been broken but isn't the simplest thing to do here to update to @xstate/react@4.0.2
? That works OK: TS playground. I mean - I'm not sure if we need any other resolution of this issue. I will recheck why it broke in the morning though.
Sure, that resolved it for us and avoids https://xkcd.com/979/
Leaving open for your tracking only.
XState version
XState version 5
Description
Updated from 5.4 -> 5.5
Expected result
Everything works, everything compiles (patch change).
Actual result
New type errors (state.context values being inferred to any instead of the correct type).
Reproduction
link here
Additional context
"@xstate/react@^4.0.0": version "4.0.1" resolved "https://registry.yarnpkg.com/@xstate/react/-/react-4.0.1.tgz#a5cec511e23e44ac5dd64852a1497efb6434c3f0" integrity sha512-UB9qUC11wcaYd05wGea0mvEA3uTHikNaB4InMZfxD7MVFxzBFU+3JFkemjiN8bDdPJfDrObyP9ZPDVojq2LytA== dependencies: use-isomorphic-layout-effect "^1.1.2" use-sync-external-store "^1.0.0"
typescript@^5.0.0: version "5.3.2"