'logEvent() is stacked twice in react-native-firebase
I'm using react-native-firebase/analytics@^14.8.0
When the button is touched, logEvent() is generated.
When an event is generated and checked in firebase -DebugView, it is touched once, but two identical logs are accumulating.
Why is this one like that? Please reply how to solve it.
app.js
.
.
.
export default(()=>{
cosnt [cnt,setCnt] = useState(100);
const onPress = useCallback(async ()=>{
await analytics().logEvent('signup',{
name:`test${cnt}`
})
},[])
return (
<View>
<Button title="test" onPress={onPress}/>
</View>
)
})
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|