kphurley / swlcgdb

A Deckbuilder for Star Wars: The Card Game LCG
4 stars 3 forks source link

React-Tooltip slows lists down at any reasonable scale #39

Closed kphurley closed 7 months ago

kphurley commented 7 months ago

React-Tooltip is not performant in lists. We cannot render it every time for large lists (for example when rendering a CardList). This is going to make using search, selecting cards for deckbuilding, etc have a poor UX.

Need to find a way to lazy load the tooltips (i.e. - only mount it when text is moused over, rather than always rendering it).

kphurley commented 7 months ago

This strategy might fix it - https://react-tooltip.com/docs/examples/render.

It will require bumping the npm package to v5.

kphurley commented 7 months ago

The above worked - I needed this working for the deckbuilding UI, so I will fix this in that update. Since I have a known fix for this coming, im closing this.