-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hello, thank you for fixing the overlay flickering :)
I found another issue: When highlighting occurs, UI changes are bugged.
In this repro, changing the screens will work, but will stop working once highlighting occurs.
import React, { useState } from 'react';
import { Button } from 'react-native';
import { HighlightableElement, HighlightableElementProvider, HighlightOverlay } from 'react-native-highlight-overlay';
export default function App() {
const [highlightId, setHighlightId] = useState<string>()
const [screen, setScreen] = useState<string>('screen1')
return (
<HighlightableElementProvider>
{ screen === 'screen1' &&
<HighlightableElement id="button1">
<Button title={'button1'} onPress={() => {
if (highlightId) {
setHighlightId(null)
} else {
setHighlightId('button1')
}
}}/>
</HighlightableElement>
}
{ screen === 'screen2' &&
<HighlightableElement id="button2">
<Button title={'button2'} onPress={() => {
if (highlightId) {
setHighlightId(null)
} else {
setHighlightId('button2')
}
}}/>
</HighlightableElement>
}
<Button title={'Change Screen'} onPress={() => {
if (screen === 'screen1') {
setScreen('screen2')
} else {
setScreen('screen1')
}
}}/>
<HighlightOverlay
highlightedElementId={highlightId}
onDismiss={() => {}}
/>
</HighlightableElementProvider>
)
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working