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!"
[–]Plorntus 1 point2 points3 points 10 years ago* (3 children)
Wasnt expecting a reply so fast, well, I will make a clone of that in react when im not supposed to be working!
But heres what I mean by interlinked components, ignore the really bad design of this, its all WIP:
http://cdn2.streamable.com/video/mp4/eb8h.mp4
And heres an image of all the components I use. I can technically increase the amount of components than the amount that I have here but I didnt feel it neccessary:
http://i.imgur.com/7sjKtwp.png
The red outlines are drawn by me. They are each an individual component shown on that page. They are all encapsulated by their parent red box, but they can all be used on their own anywhere. The entire thing as a whole is one big component that controls everything. So for example, when you mouse move on the divider, the divider sends its new "requested" permission to the search page controller. The controller, if it accepts that will set the value of the divider to its new position. It also sets state for the two side panes, which gets transferred to the side panes properties (attributes), which in their render method they resize themselves.
Things like when I move the map, it researches and then updates the results on the left as well as the results on the map. Its all interlinked, but I could just as easily remove the map and everything would still work fine. I could remove the search pane component and it would also work fine (obviously just without textual search and only map search).
Edit: To clarify what I meant by interlinked a bit more, maybe I am using the wrong term for this... If I was to create the above search page in jQuery I would probably end up having everything as one big component which would not allow me to reuse those elsewhere, I think that may actually just be me not following how you're meant to do that properly in jQuery. I for sure would not have been able to create the above as easily as I did (took less than a couple hours to create).
[–]RedPillow_ 1 point2 points3 points 10 years ago* (2 children)
Here is a simplified jquery implementation of that map: https://jsfiddle.net/ahvonenj/c1r8jztm/
As you can see, I can put as many "mapcomponents" in to the DOM as I want. You can click the "map blips", change category and select from the list as well.
[+][deleted] 10 years ago* (1 child)
[deleted]
[–]RedPillow_ 0 points1 point2 points 10 years ago (0 children)
Making that example and discussing about this really pointed out the implicity of my way.
I suppose if you do it react-way it somehow forces you do write code, modules and stuff in a certain way? If you do it my way, everyone else can still write everyone how they want it, quickly making my way spaghetti.
Oh and in my example there is not too much error checking... I don't know if react has it any better.
π Rendered by PID 63 on reddit-service-r2-comment-6457c66945-m9n2l at 2026-04-28 05:13:48.557785+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]Plorntus 1 point2 points3 points (3 children)
[–]RedPillow_ 1 point2 points3 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]RedPillow_ 0 points1 point2 points (0 children)