Skip to content

Commit 07ab4e7

Browse files
committed
Fixed all flow errors
1 parent 84a8bf1 commit 07ab4e7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Keyframes.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ import {
77
View,
88
} from 'react-native';
99

10-
const PTRKeyframesView = requireNativeComponent('PTRKeyframesView', Keyframes);
10+
const PTRKeyframesView = requireNativeComponent('PTRKeyframesView');
1111

1212
type Props = React.ElementConfig<typeof View> & {
1313
onStop: Function,
1414
};
1515

1616
class Keyframes extends React.Component<Props> {
17-
constructor(props) {
18-
super(props);
17+
ref = React.createRef<typeof PTRKeyframesView>();
1918

20-
this.ref = React.createRef();
19+
constructor(props: Props) {
20+
super(props);
2121
}
2222

2323
onStop = () => {
@@ -56,7 +56,7 @@ class Keyframes extends React.Component<Props> {
5656
this.runCommand('resume');
5757
}
5858

59-
runCommand(name, args = []) {
59+
runCommand(name: string, args?: Array<number> = []) {
6060
UIManager.dispatchViewManagerCommand(
6161
this.getHandle(),
6262
UIManager.PTRKeyframesView.Commands[name],

0 commit comments

Comments
 (0)