insomnia/packages/insomnia-app/app/ui
Dimitri Mitropoulos e161f45b06
ResponseTimer callstack exceeded (#3386)
* no default export (prepping for hooks)

* makes logic match other implementation

note that above in `componentDidUpdate` it uses `<= 0`, whereas here it uses `> 0` but then only checks for false.

Also, logically, there's no way to ever get `aria-hidden="true"` since it returns early so that entire attribute can just be removed.

* removes fake private class member syntax

this is moving to hooks anyway, but in the meantime...

* undoes calling identical code twice in a row...

* condenses class methods to prepare for hooks

* hooks refactor

fairly faithful to the original, this attempts to just refactor to hooks.  this exposes, again, the fact that we're setting state within useEffect.

* removes 200 ms offset for response time

so that, now, you know, the time reported is the actual time.

* adds logging for response timer lage

* removes timer logging and `responseTime` prop after PR discussion

it's definitely fruitful, but the fix for the callstack exceeded is what needs to be the focus.

* removes shadowed variable per PR feedback

* reinstates and documents 200ms compensation

* add delay endpoint to example server

* Update packages/insomnia-app/app/ui/components/response-timer.tsx

Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-05-17 18:58:05 -05:00
..
components ResponseTimer callstack exceeded (#3386) 2021-05-17 18:58:05 -05:00
containers [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
context [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
css Improve spec preview code font color (#3369) 2021-05-13 18:05:27 +12:00
images Remove Core and Designer specific cases (#3034) 2021-02-03 12:19:22 +13:00
redux [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
dnd-backend.ts [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
index.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00