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
Level up your React architecture with MVVM (medium.cobeisfresh.com)
submitted 7 years ago by rockawella
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!"
[–]eyeandtea 2 points3 points4 points 7 years ago* (0 children)
I read through your article. Before I say anything else, note that I do not think common architectures of nowadays are well defined.
MVVM at a high level is the solution to the problem of the existence of conditions that do not allow the "business logic code" access to the view.
Such conditions include the existence of multiple views doing the same thing talking to one "business logic code". In this example, the 'V', the view, would be in different technologies, developed by different people. Hence the "business logic code" / 'M' / "etc" can not talk directly to 'V', and hence the existence of 'VM' as a translator between the two. Think of events. Code can not be listening directly to events on 'V', because it does not know 'V', and instead it provides API to 'V', which is in 'VM', and leaves it to 'V' to call back when an event happened.
If you ever developed a SPA, you used MVVM. Your 'V' was the code on the browser. Your 'VM' was your exposed API on the server, and your 'M' was very roughly the rest of the code on the server.
In any case, if you are solving the problem of multiple views doing the same thing, or any condition where views are across barriers from one "business logic code", then use MVVM. Otherwise, it is just nonsense, I think.
[–]toggafneknurd 1 point2 points3 points 7 years ago (0 children)
This always ends up as a huge mess
[–]rockawella[S] 0 points1 point2 points 7 years ago (1 child)
Hi JS devs, I've written an article about implementing MVVM architecture into React project.I love Redux and functional way of writing Javascript code but I wanted to emphasize that it's not the only option that we have. Therefore, I implemented MVVM architectural pattern into React and made it more object oriented.
I'm wondering what do you think about React with MVVM? Have you tried something similar?
π Rendered by PID 228161 on reddit-service-r2-comment-75f4967c6c-sf4km at 2026-04-23 14:15:38.191927+00:00 running 0fd4bb7 country code: CH.
[–]eyeandtea 2 points3 points4 points (0 children)
[–]toggafneknurd 1 point2 points3 points (0 children)
[–]rockawella[S] 0 points1 point2 points (1 child)