Context menu flickering(may be it re-render) after modify message data
See original GitHub issueHi, i just found this problem. it’s REALLY HARD TO KNOW.
you can see the video here, as I just add a reaction to view:
https://user-images.githubusercontent.com/8202437/174272591-80fdb8cc-c6eb-4c04-baa2-15015bcbfee8.mov
Here is the main layout for view:
<ContextMenuView>
<Bubble/>
<ReactionView/>
</ContextMenuView>
Inside onPressMenuItem, i just update message:
const message = props.currentMessage
const reactions = message.reactions
reactions.push({
'id': '1',
'type': 200,
'date': new Date().getTime(),
'by': currentUser.id
})
message.reactions = reactions
handleChoosenMessageReaction(message)
const handleChoosenMessageReaction = React.useCallback((message) => {
const newMessages = [...messages]
const index = newMessages.findIndex(mes => mes._id === message._id)
console.log('index', index)
if(index > -1){
newMessages[index].reactions = [...message.reactions]
console.log('handleChoosenMessageReaction', message.reactions)
setMessage(newMessages)
}
})
I tried to use https://github.com/mpiannucci/react-native-context-menu-view but it’s does not make problem, But I want to use your lib because it’s better
Please helppp
Issue Analytics
- State:
- Created a year ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Context menu flickers on and off under Fedora : r/firefox - Reddit
It happens under a new profle, with no extensions. It pops up, but then when you mouse over it starts flickering. any idea...
Read more >How to fix screen flickering in Windows PCs/laptops
Select the arrow to expand Display adapters. Under Display Adapters, right-click the adapter, then select Update driver; Note: You may need to ...
Read more >android - RecyclerView blinking after notifyDatasetChanged()
Problem is when we have refresh in the recyclerView, it is blincking for a very short while in the beginning which looks strange....
Read more >When does React re-render components? - Felix Gerschau
Why doesn't my React component update when its props change? ... three-dot menu on the right -> More tools -> Rendering -> Paint...
Read more >Screen Flashes, Flickers and Form Refreshes
We are working on a complex database, based on continuous forms that seems to have issues with screen flickers and form refreshs when...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, this has been fixed in version 1.8.1 ✨
I also added
shouldWaitForMenuToHideBeforeFiringOnPressMenuItem
prop toContextMenuView
if you wantonPressMenu
to fire ASAP.Here’s an excerpt from the docs:
Thanks for filing an issue 😌
@fukemy Hey, I’ve added
Test02Screen
to reproduce your bug.https://user-images.githubusercontent.com/18517029/174292418-a660a28a-86a9-43a3-b33a-51f35ef43160.mov
As a temp. solution, I’m going to update
onPressMenuItem
so that it fires after the context menu is hidden firstOnce i finish releasing the patch, I’ll close this issue 😌