This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// deno-lint-ignore-file no-explicit-any | |
type FlatMonad<T> = T extends MayErr< | |
infer InnerE, | |
infer InnerT, | |
infer InnerIsSuccessful | |
> | |
? InnerIsSuccessful extends true | |
? FlatMonad<InnerT> | |
: InnerE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useSpringValue, animated } from "@react-spring/web"; | |
import React, { useCallback, useReducer, useRef, useEffect } from "react"; | |
import _ from "lodash/fp"; | |
import useWaitValue from "./useWaitValue"; | |
const DATA_LIST = _.range(0, 25).map((i) => ({ | |
title: `asdf${i}`, | |
})); | |
const useWaitValue = <T>(v: T | undefined | null, countMax: number = 5) => { |