Skip to content

Works on iOS and Android - but I can't make it work in a web browser #3131

Answered by joshon
joshon asked this question in Q&A
Discussion options

You must be logged in to vote

Putting the gesture handler inside the conditional in the render of the tile enabled it to work on web. Not sure why (or how I came to try that :) )

return (<>
            {inited ? <GestureDetector gesture={composed}><Animated.View
                key={"tile" + id}
                style={AnimationStyle}
            >
                {/*{console.log("Tile rerender: ", tileSV.value.letter, " id:", id, "x: ", x.value, "y: ", y.value)}*/}
                <Animated.Text style={[AnimationTextStyle, styles.tileText]}  maxFontSizeMultiplier={1}>
                    {gridStore.getState().gameOver? "" : tileSV.value.letter}
                </Animated.Text>
            </Animated.View></GestureDete…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by joshon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant