[kotlin-redux 1.4.0-rc] kotlin-redux can't create store using new IR JS backend
See original GitHub issueTrying to create a store with the kotlin-react code, but it fails when using the new IR js backend (kotlin.js.compiler=ir)
Repo here: https://github.com/JWood48/KotlinTests see sub project kotlin-react-redux-test
code:
@Test
fun reduxTest() {
data class TestState(val msg: String)
class TestAction : RAction
fun testReducer(state: TestState, action: RAction) : TestState = when (action) {
is TestAction -> state.copy(msg = state.msg+"1")
else -> state
}
val store = createStore(::testReducer, TestState("TEST_"), rEnhancer())
}
fails with
´´´ Uncaught TypeError: action._get_action__0 is not a function ´´´
Works if disabling the new ir js backend
NOTE: The example in the repo is based on https://github.com/lawik123/kotlin-poc-frontend-react-redux
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Any news on this? I have the same issue with Kotlin 1.4.20 IR and latest redux.
Not reproduced Tested on Kotlin Wrappers v.0.0.1-pre.268-kotlin-1.6.0