Props for TokenListProvider. tokens is read by identity, so hoist the array or memoise it; a fresh one on every render rebuilds the lookup map.
tokens
<TokenListProvider tokens={mockTokens}>{children}</TokenListProvider> Copy
<TokenListProvider tokens={mockTokens}>{children}</TokenListProvider>
Props for TokenListProvider.
tokensis read by identity, so hoist the array or memoise it; a fresh one on every render rebuilds the lookup map.Example