Remix.run Logo
netbioserror 15 hours ago

We should probably be making widget toolkits for the Canvas and using WebSockets for communication. DOM manipulation is a total hack-job. It's somewhat flexible, but the performance and dark-pattern cost is just too great. If you're making an interactive application, then treat it like an application and draw widgets to a canvas.

ioseph 14 hours ago | parent | next [-]

This is an insane take, show me a responsive button with hover state and a tooltip implemented in the canvas that outperforms a button rendered with React.

rc1 11 hours ago | parent [-]

Figma?

christophilus 15 hours ago | parent | prev | next [-]

Accessibility suffers with that approach.

extra88 14 hours ago | parent [-]

It doesn't just suffer it's impossible unless you recreate the whole thing with actual HTML behind the <canvas> rendered version.

zelphirkalt 9 hours ago | parent | prev [-]

Don't forget about the privacy cost associated with the canvas. If this ever becomes widespread, we will have many many sites extract browser fingerprinting information from the canvas. It would then move the game one more step towards dystopia, where we have to analyze and block certain ways of code interacting with the canvas and it might even prove impossible. And then incapable web devs will offer you no solution but canvas buttons for the login to your bank account. No, I don't think this is the way forward.