Pinned
Your timeline might have quite a lot of butterflies today, and I've seen a bunch of people voicing the opinion that it's just "the libs leaving X".
No.
It's just impossible to have a technical discourse on a platform that uses an algorithm so tuned to ragebait.


![const someArray = [1,2,3,4]
const sum = await someArray.reduce(async (accumulator, element) => {
// of course this could be something asynchronous
// but seriously... just use a loop instead
return (await accumulator) + element
}, Promise.resolve(0))](https://pbs.twimg.com/media/FYf0MhSVsAEOzHG.jpg)


![// we want to enforce a parameter that has gone through useMemo or useCallback
export function useMyHook(arg: StableReference<MyArgumentType>) {
// ...
}
// just put this in a .d.ts file in your project
declare const __StableReference : unique symbol;
type StableReference<T> = T & {[__StableReference]: true}
declare module 'react' {
function useCallback<T extends (...args: any[]) => any>
(callback: T...](https://pbs.twimg.com/media/FOd-1E2VcAIu8v-.jpg)

