Fork me on GitHub
#rum
<
2016-09-20
>
honzabrecka16:09:29

Does rum offer a way to forceUpdate (rerender immediately) a component by changing its state atom?

martinklepsch16:09:00

@honzabrecka I guess you could make a mixin

martinklepsch16:09:18

although not sure how you'd get a reference to the internal state atom

honzabrecka17:09:06

@martinklepsch (:rum/react-component state) isn’t the instance of the component itself, is it?

martinklepsch17:09:18

it is (the underlying react component)

honzabrecka17:09:13

but .forceUpdate method is unfortunately isn’t available

honzabrecka17:09:57

I don’t undrestand, https://github.com/tonsky/rum/blob/gh-pages/src/rum/core.cljs#L177 gets the same instance and it has .forceUpdate method

niwinz17:09:45

(.forceUpdate (:rum/react-component state))

niwinz17:09:50

should work

honzabrecka17:09:16

It breaks things like dragging… I don’t know 😕

misha18:09:16

is usual subscription (rum/react) to coordinates too slow for you, @honzabrecka?