For drawing a thumb on a slider style component, would it be better for performance to draw it in the same canvas as the track, or to use a Box and overlay it instead? The thumb would also need to handle interactions
r
romainguy
03/03/2025, 4:49 AM
No difference in terms of rendering performance.
romainguy
03/03/2025, 4:49 AM
I would do everything as a single component
romainguy
03/03/2025, 4:50 AM
(also unless you use an offscreen layer there's only one "canvas". The Canvas APIs are just a means to render into a buffer, the Canvas itself isn't anything)