Troubleshooting `Match` Usage for Conditional Rendering in React
I'm having a little trouble getting
I would expect that the
Match to work as I would expect. I'm using it with React to render different content if an array is empty:I would expect that the
values parameter in the second when argument would have a type of NonEmptyArray<number> but it's NonEmptyArray<unknown>. I feel like I must be missing something about how Match.when works... The docs only seem to use predicates on fields of the matched value. Is it incorrect to use a predicate on the whole value?