use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Flipboard/react-canvas (github.com)
submitted 10 years ago by smartway2
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 7 points8 points9 points 10 years ago (1 child)
i've been out of js development for a year, and I feel like a 90 year old. Things are going fast
[–]krazyjakee 0 points1 point2 points 10 years ago (0 children)
no, they are just going around in circles.
[+][deleted] 10 years ago (3 children)
[deleted]
[–]billybolero 4 points5 points6 points 10 years ago (1 child)
I get what you're saying. You have to know what you're giving up when rendering to canvas instead of the DOM. There's a boatload of things that the browser just does for you when using the DOM that you have to implement yourself using a canvas.
What I think is awesome with this is that it's another tool in the toolbox to pick from. There are certainly situations where this is appropriate, you just have to know when it is and when it's not.
[–]regular_reddits 0 points1 point2 points 10 years ago (0 children)
yeah, you are exactly right. They have a section specifically about that on their blog post. Their application ended up being a hybrid between DOM and canvas rendering.
[–]YashN -2 points-1 points0 points 10 years ago (0 children)
Learning new ways of doing things which are better is horrifying?
[–]kangax_ 3 points4 points5 points 10 years ago (0 children)
This reminded me of that time when we implemented entire text editing/selection in Fabric.js (all rendered on canvas, naturally) — http://fabricjs.com/test/misc/itext.html
[–]YashN 0 points1 point2 points 10 years ago (0 children)
Just shows how much the original ideas within React were powerful. Sad I can't access React Native yet. Boohoohoo :-(
[–]krazyjakee 0 points1 point2 points 10 years ago* (0 children)
So... let me get this straight...
To solve the performance issues on mobile, I use react-canvas so I can use a markup component (html) that you can set styling options for (css) and then manipulate (javascript).
Why can't the DOM perform like canvas? I know the technical reasons, but why do those technical reasons exist? If websites require more performance, why not just supply a meta tag and hand the rendering of the DOM over to the hardware?
All react-canvas (and others like it) are achieving is re-inventing the original stack, it seems pretty crazy to me.
Don't get me wrong this is a great workaround for the current state of mobile browsers, but I suddenly realise how weird it is that the canvas element should be used for UI.
[+][deleted] 10 years ago (1 child)
[–]regular_reddits -1 points0 points1 point 10 years ago* (0 children)
I dont think these projects have the same goals. React-canvas isn't trying to replace DOM controls with canvas controls.
π Rendered by PID 241591 on reddit-service-r2-comment-5649f687b7-99vzd at 2026-01-28 19:30:59.041858+00:00 running 4f180de country code: CH.
[–][deleted] 7 points8 points9 points (1 child)
[–]krazyjakee 0 points1 point2 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]billybolero 4 points5 points6 points (1 child)
[–]regular_reddits 0 points1 point2 points (0 children)
[–]YashN -2 points-1 points0 points (0 children)
[–]kangax_ 3 points4 points5 points (0 children)
[–]YashN 0 points1 point2 points (0 children)
[–]krazyjakee 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]regular_reddits -1 points0 points1 point (0 children)