Hello everyone, I have a problem with Ktolin/JS R...
# react
z
Hello everyone, I have a problem with Ktolin/JS React and redux. when calling
useSelector
for a property of a dataclass, that I use as store, i get the following error:
Copy code
react-dom.development.js:26923  Uncaught TypeError: queryState.get_currentQuery_smfme0_k$ is not a function at Welcome$lambda$lambda
But looking at the underlying code, this should work because it is properly generated and added(?) to the ptototype:
Copy code
protoOf(QueryState).get_currentQuery_smfme0_k$ = function () {
    return this.currentQuery_1;
  };
Seems like this is some kind of method wrapper generated by Kotlin/JS. Does anyone know how I can circumvent the generation of this wrappers or why this is failing at all? Because calling it outside of
useSelector
works just fine. 🤔 Used versions: Kotlin MPP: 1.8.21 Kotlin Wrapper Version: 1.0.0-pre.543
w
Can you share a code snippet to describe more?
z
@w_bianrytree When I'm back at the office I'll create a minimal example. 🙂
totally forgot that. ^^'
@w_bianrytree Sorry, I was caught up in some meetings yesterday. This is the link to the Repository: https://github.com/FelixEngl/kotlin_react_redux_caller_problem
Managed to make it work with js-code, added the discovery to the repository
Seems like the mangling is the problem. 🤔
w
I am having the same issues but the js method you demonstrated is returning the same error for me @zeugederunity.