mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
reduce loading rerenders
This commit is contained in:
parent
3d4c4dd2d4
commit
7ba00d5ccd
@ -113,7 +113,7 @@ export const Debug: FC = () => {
|
||||
const [runningRequests, setRunningRequests] = useState<Record<string, boolean>>({});
|
||||
const setLoading = (isLoading: boolean) => {
|
||||
invariant(requestId, 'No active request');
|
||||
if (runningRequests?.[requestId] !== isLoading) {
|
||||
if (Boolean(runningRequests?.[requestId]) !== isLoading) {
|
||||
setRunningRequests({
|
||||
...runningRequests,
|
||||
[requestId]: isLoading ? true : false,
|
||||
|
Loading…
Reference in New Issue
Block a user