Skip to content

useCollator

@astryxdesign/core v0.7.1 · useCollator

Parameters ​

NameTypeDefaultDescription
optionsMaybeRefOrGetter<Intl.CollatorOptions | undefined>—Optional collation behavior such as numeric ordering, sensitivity, punctuation handling, and case order. Pass a ref or a getter when the options can change; the collator is rebuilt when they do.

Returns ​

NameTypeDescription
collatorComputedRef<Intl.Collator>A memoized collator bound to the active InternationalizationProvider locale. Read collator.value to compare.