Return shape of useTokenList. byId is built from tokens, so the two never disagree.
byId
tokens
const { tokens, byId } = useTokenList()const selected = byId.get(storedId) ?? tokens[0] Copy
const { tokens, byId } = useTokenList()const selected = byId.get(storedId) ?? tokens[0]
Return shape of useTokenList.
byIdis built fromtokens, so the two never disagree.Example