1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00
2020-11-29 01:26:16 -07:00

9 lines
244 B
TypeScript

import { useMemo } from 'react';
import format from 'string-format';
type FmtArgs = { [k: string]: any } | string;
export function useStrf(str: string, fmt: FmtArgs, ...deps: any[]): string {
return useMemo(() => format(str, fmt), deps);
}