Skip to content

Commit

Permalink
Support setNativeProps
Browse files Browse the repository at this point in the history
  • Loading branch information
sonaye committed Aug 18, 2018
1 parent 9af045d commit b21661a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"license": "MIT",
"name": "haraka",
"description": "Stateful animations in React Native.",
"version": "0.0.27",
"version": "0.0.29",
"main": "lib/index.js",
"repository": {
"type": "git",
Expand Down
9 changes: 9 additions & 0 deletions src/behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ export default class Behavior extends React.PureComponent {
});
};

handleRef = ref => {
this.ref = ref;
};

setNativeProps = props => {
this.ref.setNativeProps(props);
};

render() {
const { mounted } = this.state;

Expand Down Expand Up @@ -222,6 +230,7 @@ export default class Behavior extends React.PureComponent {

return (
<Animated.View
ref={this.handleRef}
style={[style, viewStyles, propStyles, nativeStyles]}
{...{ pointerEvents }}>
<Animated.View style={styles}>{children}</Animated.View>
Expand Down

0 comments on commit b21661a

Please sign in to comment.