Skip to content

Instantly share code, notes, and snippets.

View marcolink's full-sized avatar
🪐

Marco Link marcolink

🪐
View GitHub Profile
@marcolink
marcolink / useAllTrue.ts
Created August 4, 2022 07:29
React hook for a reduced boolean value
import { useEffect, useState } from "react";
function reduce(record: Record<string, boolean>): boolean {
return Object.keys(record).reduce((previousValue, currentValue) => {
if (!record[currentValue]) {
return false;
}
return previousValue;
}, true);
}
@marcolink
marcolink / axios-migration-guide_0.xx_to_1.x.md
Last active July 18, 2023 14:09
axios migration guide 0.xx to 1.x

axios migration guide 0.x to 1.x

at the time writing this, the latest version was 1.4.0.

Resources

Request Interceptors

The provided type for request intercetptor functions changed:

@marcolink
marcolink / contentful-fetch-example.md
Last active July 28, 2023 07:51
Use contentful sdk/library with fetch adapter