Fork me on GitHub
#cljsrn
<
2017-09-21
>
aaron5117:09:03

In component-did-update, how do I call .scrollTo on the FlatList inside the component? (It's the only child)

aaron5118:09:01

Found @U06F82LES 's https://gist.github.com/pesterhazy/4d9df2edc303e5706d547aeabe0e17e1 But is it not possible to get the sole element inside component-did-update, without atoms?

pesterhazy18:09:31

@U3JH0P5LJ you could use string refs, but they're deprecated

pesterhazy18:09:26

The atom is the right thing here I think - we need this because of the stateful nature of react components

aaron5118:09:06

OK, great. I was just surprised that it's not possible to call r/children on %1, or something, to get the element back Thanks for the gist btw!