question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[kotlin-redux 1.4.0-rc] kotlin-redux can't create store using new IR JS backend

See original GitHub issue

Trying 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:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nikanorovcommented, Nov 25, 2020

Any news on this? I have the same issue with Kotlin 1.4.20 IR and latest redux.

0reactions
aerialist7commented, Nov 21, 2021

Not reproduced Tested on Kotlin Wrappers v.0.0.1-pre.268-kotlin-1.6.0

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found