Hacker News new | past | comments | ask | show | jobs | submit login

SVG. It's remarkably powerful given that it supports arbitrary linear transformations and all sorts of computer graphics things.



Can anyone give a brief explanation of what it means to use SVG in this context?

I think of it as a file format, but I'm assuming no files are involved here. Aside from that I've noticed the contents of SVG files look similar to the 2d canvas operations—which to my mind seems like the natural thing to use for something like this—so why use SVG instead? And is there any relationship between canvas drawing and SVG?


SVG works much more naturally with React, since it’s able to be managed via the DOM. Doesn’t have to be an <img />.


JavaScript can write SVG just like it writes HTML. Your React render() can return <svg><rect ... /></svg> as easily as <div><p>...</p></div>


Yep, svg + react = declarative graphics. I love it. I used it to replace D3 in a project I worked on last year and no regrets at all.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: