TanStackT
TanStack16mo ago
6 replies
foolish-indigo

Am I supposed to trim or filter undefined / null / empty strings from query keys?

The UI might not always have optional variables passed into the query key, so the result would be ["foo", "bar", ""] or ["foo", "bar", null]

Is this okay? My first assumption is that - it is fine and it would be more overhead to filter falsy values out.
Was this page helpful?