JetBrains / kotlin-wrappers

Kotlin wrappers for popular JavaScript libraries
Apache License 2.0
1.33k stars 165 forks source link

kotlin-react-router useBlocker is marked as unstable, has been stable since react-router@6.19.0 #2202

Closed Emdeekay closed 5 months ago

Emdeekay commented 5 months ago

kotlin-wrappers-bom:1.0.0-pre.686 kotlin-react-router-dom:6.20.1-pre.686

When using these versions (or even 6.20.0-pre.653) the following error is shown

unstable_useBlocker is not a function
TypeError: unstable_useBlocker is not a function
[..]

This is caused by the method useBlocker having the annotation @JsName("unstable_useBlocker")

Since react-router@6.19.0, useBlocker is marked as stable. See changelog of react-router https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#minor-changes-2

I assume the issue is caused by "useBlocker" being hardcoded as unstable in kotlin-react-router/karakum/annotations/annotateUnstableDeclaration.js

Due to this, we can't update to any version newer than 6.17.0-pre.642. Please remove the unstable annotation from this function.

turansky commented 5 months ago

@Leonya Could you please release these changes?

turansky commented 5 months ago

@Emdeekay Fix released in pre.687. Could you please try it?

Emdeekay commented 5 months ago

@turansky Tried it just now and can confirm the error about "unstable_useBlocker" is gone. I do have other errors now, but have to still check if those are our fault or not. I may create a new issue if I cant figure out what the new issue is.