Screen blinking when removing queries in React Query - reactjs

I am currently using TanStack React Query to make an UI and I have an issue when I invoke queryClient.removeQueries(queryKey) clicking on a button.
The issue is that every click I do, the display flickers once. The cache is correctly cleaned but the flicker is annoying.
Is this a normal behaviour? I would like to solve it.
Thanks in advance!

Related

primereact overlay components (dialog, sidebar) - inconsistent bug - Maximum update depth exceeded

So we have a primereact components based app,
and the problem occurs when triggering the show of an overlay component
(usually a Dialog, but I've noticed it could also happen with Sidebar),
in a specific page that concerns with showing a table and the basic crud associated with it,
we show the form to create/update inside a Dialog,
when clicking the appropriate button the dialog shows..
only sometimes the dialog crashes and this error shows:
this have been happening for a very long time, and there were many attempts,
not even to fix it, but just to get the bug re-produced consistently.
couldnt do it...
of course tried finding a setState that could get stuck in a loop
any help would be appreciated :)

How to access background while modal active in react-native-modal

I am trying to implement a page where top part of page is static and bottom part keeps on changing. I was able to achieve this using react-native-modal. But the problem is the back arrow button which is always supposed to be on the top of page becomes inaccessible entire time. I want to access the button even when modal is active.
Any help will be really appreciated cause it's not available anywhere, I went through the entire react native and react-native-modal docs related to this

How do I stop my ReactJS webite from twitching when I move my cursor?

A simple, one page view website, which I built on ReactJS started twitching anytime I moved my cursor. It seems like the browser width is changing, with a few pixels of margin added to the right, every time that happens. This doesn't seem to happen when viewing with the Chrome browser in mobile screen mode, under the developer tools. Which probably means it's as a result of the cursur interacting with the page. Has anyone encountered something similar?
It usually happens when you have an element that changes its width, padding, margin or border on hover or a Javascript event. This is not caused by React.
Please, share some css or JS you think may be involved to help more.
I found the bug, an animating component that kept touching the edge of the browser was the issue. I added some margin to the right of the component and the twitching stopped. Thanks to everyone for your help.

material-ui CardActionArea onClick does nothing in some instances

I use variations of <CardActionArea onClick={someFunction}> throughout my React app, and I've come across an instance where clicking the card does not fire the onClick function. This is only when the component is rendered in a certain tree, in all other parts of the app it works as expected. I'm using in Algolia's react-instantsearch-dom component in my component that's giving the issue.
The ripple effect (the animation that shows the user clicked the card) fires in every situation. So it doesn't seem to be something as simple as a transparent div overlaying the card. Below is a working component tree compared to the one with the issue:
working
click does nothing
One odd thing you can see above is both CardActionArea components show an empty onClick. But the function still works in most cases.
I'm using onClick={() => console.log('click')} to test, so it doesn't appear to be an issue with the function itself. Any ideas on what could prevent the onClick even from firing, or suggestions for troubleshooting would be appreciated.
Edit: This issue doesn't happen in iOS Safari, but it does occur in Firefox.
Edit 2: Since I don't understand this well enough to reproduce it, and it doesn't appear to be something obvious in the code, I'm looking for troubleshooting advice. Is there something in Chrome's developer tools I can use to trace this behavior?
The issue was the anonymous component between Article and CommentEditor. The component was rendered into a Dialog conditionally, and removing the condition so that it always rendered when the Dialog was open fixed the issue.

reCaptcha v3 React invisible component

So i am using the react-recaptcha-v3 component in my react app, and it renders an invisible recaptcha on my page. Is there any way to trigger the challenge? I want to see how it would look
I faced a similar problem trying to trigger the captcha. I read somewhere that it uses the movement of the mouse to segregate bot behaviour or not.
Try using the mouse keys on your computer to scroll the page. Use Left-Alt + Left-Shift + NumLock to move the mouse and scroll a few times. This should trigger the image reCaptcha test. It worked for me.
Hope this helps !

Resources