https://kotlinlang.org logo
#rx
Title
c

crazdrms

06/08/2018, 3:46 PM
Copy code
override fun sayHello() {
        val action = newRxAction(""SAY_HELLO")
        addRxAction(action,
                Observable.just("Hello").subscribe {
                    postRxAction(newRxAction("SAY_HELLO", "msg", it))
                })
    }
I am trying to use RxFlux here and as far as I can tell this should trigger event to store where store can check the action SAY_HELLO and post change to view with following code
Copy code
override fun onRxAction(action: RxAction) {
        when (action.type) {
            "SAY_HELLO" -> {
                val connected: String = action.get("msg")
            }
        }
        postChange(RxStoreChange("MY_STORE", action))
The problem is the action creator is not interacting with store, what am I missing here?