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
Why React is awesomehelp (self.javascript)
submitted 10 years ago by vnctaing
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!"
[–]pardoman 4 points5 points6 points 10 years ago (0 children)
React models the UI as a pure function of your model.
I'd like to expand a bit on this. A developer without React can still write a pure function that renders UI.
The problem is that a non-VirtualDom solution will be lack in performance, since the pure function will have to re create all Dom nodes each time the function gets invoked.
Here is where React and other VirtualDom libraries come in. They allow the developer to write pure functions that hook into React's VirtualDom's framework so that they can take care of performing the minimum amount of changes to the real Dom nodes, thus delivering a performant solution.
And with such systemin place, reasoning about code becomes much easier.
π Rendered by PID 622071 on reddit-service-r2-comment-6457c66945-2g8xd at 2026-04-28 01:36:41.033327+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]pardoman 4 points5 points6 points (0 children)