Skip to content

React.useEffect #8

@igorroman777

Description

@igorroman777

Hello,
I have a question. I am writing a game according to your scheme with three.js.
At first I have some crashes, but then I deleted according to your scheme:

React.useEffect(() => {
// Clear the animation loop when the component unmounts
return () => cancelAnimationFrame(timeout);
}, []);

But when I make the TouchableView:

<TouchableView
id="threeHome"
onLayout={_onLayout}
shouldCancelWhenOutside={false}
onTouchesBegan={event => _onTouchesBegan(event)}
onTouchesMoved={event => _onTouchesMoved(event)}
onTouchesEnded={event => _onTouchesEnded(event)}
>
<GLView
style={ flex: 1 }}
onContextCreate={onContextCreate}
/>

THEN I have the same problem again: I am switches the tabs and the app crashes.
How can I do something similar for TouchableView?
Kind regards
Igor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions