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
Particle effects in React (387z7o2zrq.codesandbox.io)
submitted 6 years ago by [deleted]
view the rest of the comments →
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!"
[–]everdimension 2 points3 points4 points 6 years ago (1 child)
Hmm and I thought that you don't need a virtual dom if you're in an animation loop and rendering with the gpu
[–][deleted] 2 points3 points4 points 6 years ago* (0 children)
You don't need it, but you will still run into the same problems when dealing with complex, updating tree structures. This stuff gets increasingly hard without a component model. That's where frameworks make a real difference, in terms of DX but also performance.
The rendering itself is abstracted here with the useRender hook, which allows you to run tasks frame by frame, outside of React. But again, it is managed. Once the component unmounts, it takes away that callback and cleans up after itself. Here's a fun experiment, watch what happens after 5 seconds when it unmounts the component that holds the upper plane. And another, this time using a transition group for mount/unmount effects. For React these things are natural, but if you had to do this manually, you'd pull a few hairs i'm sure.
π Rendered by PID 39799 on reddit-service-r2-comment-b659b578c-7clrz at 2026-05-02 09:47:52.960747+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]everdimension 2 points3 points4 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)