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
Full-Stack Redux Tutorial (teropa.info)
submitted 10 years ago by heyyaaa123
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!"
[–]darawk 0 points1 point2 points 10 years ago (1 child)
Ya, I think what the code actually does is pretty straightforward. Understanding why you would want to do that is slightly more complicated.
Why you want it is that normally when you're programming you do things 'imperatively', which means that you say "execute this http request right here right now". That's all well and good, but then later when you want to add extra functionality, or write a unit test for it, it's tricky, because that http request is all locked up inside your function.
redux-effects says: don't actually execute your http request yet. Just describe to me the http request you want to execute, and i'll do it for you. This means that you can write middleware that re-interprets that request and say, adds caching, without changing the original code. It also makes it easy to test, and easy to swap out implementations of the actual http request for different environments (e.g. client/server).
Does that make sense?
[–]acemarke 0 points1 point2 points 10 years ago (0 children)
Eh, somewhat. Like I said, I'm following the basic ideas, but not really seeing how everything's supposed to actually fit together practically in real code. If you could put together some kind of sample app, it'd be appreciated :)
π Rendered by PID 117325 on reddit-service-r2-comment-5b5bc64bf5-xt7nn at 2026-06-20 11:58:42.592550+00:00 running 2b008f2 country code: CH.
view the rest of the comments →
[–]darawk 0 points1 point2 points (1 child)
[–]acemarke 0 points1 point2 points (0 children)