public class Comparators { public static java.util.Comparator getComparator() { return new java.util.Comparator() { public int compare(Object o1, Object o2) { if (o1 instanceof String) { return compare( (String) o1, (String) o2); } else if (o1 insta
fp-ts-React稳定-钩子
使用FP-TS相等性检查进行React的稳定钩子,而不是浅层(参考)对象比较
安装
npm install fp-ts-react-stable-hooks
用法
简单示例useStableO和Option helper相等函数
import * as Eq from "fp-ts/Eq" ;
import * as O from "fp-ts/Option" ;
import { useStableO } from "fp-ts-react-stable-ho