-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Description
I have troubles with empty state flickering in my twitter extension. Usually I try to keep isLoading true as long as I have data and this works great. But in my twitter extension there seems to be some kind of race condition and I'm not 100% sure if this is a bug in my extension or in raycast itself. Maybe this is also intentional.
Raycast version: 1.25.1
Steps To Reproduce
- Start
Recent Tweetscommand - Before the list get rendered the
no resultview pop up for under a second.
CleanShot.2021-10-25.at.16.25.01.mp4
The current behavior
The code is here
I've added some console.log calls in the screenshot.
Here is the log
In the first render cycle the data is undefined and isLoading is true.
In the second render cycle the data has the correct content and isLoading is still true.
In the third render cycle the data has the correct content and isLoading is false.
I always thought that as long as isLoading is true in the beginning no no result view will pop up. My problem is that just checking for data === undefined for isLoading is not enough in my case because I support manual reload of the content.
The expected behavior
As long as isLoading is true on the first start there should be no no result view.

