Skip to content

Commit 205e90e

Browse files
committed
shorter initEventHandlers method
1 parent b157abf commit 205e90e

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/Scene.js

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -164,25 +164,7 @@ class SceneBase extends React.PureComponent<SceneBaseProps, SceneBaseState> {
164164
return;
165165
}
166166

167-
this.scene.on('start', (event) => {
168-
this.setState({
169-
event
170-
});
171-
});
172-
173-
this.scene.on('end', (event) => {
174-
this.setState({
175-
event
176-
});
177-
});
178-
179-
this.scene.on('enter', (event) => {
180-
this.setState({
181-
event
182-
});
183-
});
184-
185-
this.scene.on('leave', (event) => {
167+
this.scene.on('start end enter leave', (event) => {
186168
this.setState({
187169
event
188170
});

0 commit comments

Comments
 (0)