A quick rant.
- PouchDB is slow, because it doesn't use bare-metal IndexedDB
OK, first off I want to point out the CanIUse table for IndexedDB. Go ahead, look at it. I'll wait.
A quick rant.
OK, first off I want to point out the CanIUse table for IndexedDB. Go ahead, look at it. I'll wait.
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
import React, { ForwardedRef, forwardRef, MouseEvent } from 'react'; | |
type ClickableListProps<T> = { | |
items: T[]; | |
onSelect: ( | |
item: T, | |
event: MouseEvent<HTMLButtonElement, globalThis.MouseEvent>, | |
) => void; | |
}; |