Closed garrettmac closed 7 years ago
ability to inject a function to be triggered before mobx re-renders?
Is componentWillReact
usable?
Closing for inactivity / provided answer
plz, open this issue.
Oops. Sorry, I tried:
componentWillReact() {
LayoutAnimation.configureNext(LayoutAnimation.Presets.spring);
}
It's work!
React Native has an easy way to trigger animation by adding
LayoutAnimation.configureNext(*)
before callingsetState
.Example:
Is it possible to trigger the
LayoutAnimation
without forking? or even the ability to inject a function to be triggered before mobx re-renders?Resources:
LayoutAnimation blog post https://medium.com/@Jpoliachik/react-native-s-layoutanimation-is-awesome-4a4d317afd3e
LayoutAnimation source - https://github.com/facebook/react-native/blob/1e8f3b11027fe0a7514b4fc97d0798d3c64bc895/Libraries/LayoutAnimation/LayoutAnimation.js