gothinkster / realworld

"The mother of all demo apps" — Exemplary fullstack Medium.com clone powered by React, Angular, Node, Django, and many more
https://realworld-docs.netlify.app/
MIT License
80.57k stars 7.34k forks source link

🖥 🔧 React + Mobx #33

Closed robbiedhickey closed 6 years ago

robbiedhickey commented 7 years ago

Current Status

Todo:


I believe the React community would benefit from more examples of Mobx architectures juxtaposed against Redux in non-trivial applications. The only example I'm aware of is the SoundCloud Client developed by the excellent @rwieruch

I'm still getting my feet wet in the React ecosystem, but will take this on if there is not interest from a more experienced member in the community.

robbiedhickey commented 7 years ago

I looked into the starter kit, but it occurred to me that it might make more sense to fork the existing React + Redux example app and refactor reducers to @observable stores. Any drawbacks to this approach?

I started a fork that adds the Mobx dependencies and migrates to custom-react-scripts to enable decorator support.

rwieruch commented 7 years ago

Thanks for mentioning. Just to give you some resources:

EricSimons commented 7 years ago

@hodorswit I think your approach is perfect — no need to reinvent the React parts of the app :)

Regarding finding someone w/ more experience, @mweststrate do you know of anyone? Or perhaps someone that could provide advice to @hodorswit as he builds it out?

EricSimons commented 7 years ago

@hodorswit I just updated the issue status + set up a Gitter room where we can handle collaborator coordination 👍

mweststrate commented 7 years ago

@capaj @andykog @benjamingr @mattruby anybody interested? ^

benjamingr commented 7 years ago

@mosho1

mweststrate commented 7 years ago

[Completely offtopic] @mosho1: Wondering about it since Friday, since I forgot to ask it, but did we meet last Friday without me realizing it? ;-) [/Completely offtopic]

mattruby commented 7 years ago

I'm out on this one. Yoyo exhibition tomorrow I need to prep for!

andykog commented 7 years ago

I love the idea, will try to allocate some time tomorrow

EricSimons commented 7 years ago

@hodorswit wanna add @andykog to the repo & coordinate work? Feel free to use the gitter room I set up for this Mobx implementation if need be :)

srolel commented 7 years ago

@benjamingr @hodorswit I'll see if I have time to take a jab at it this weekend. And no, @mweststrate, sadly we did not meet :P

robbiedhickey commented 7 years ago

Just added @Mosho1 and @andykog to the repo!

andykog commented 7 years ago

Done, see hodorswit/react-mobx-realworld-example-app Replaced redux with mobx, added/modified a few components here and there. Used singletone stores for simplicity.

EricSimons commented 7 years ago

Woot! Can one of the MobX folks here take a peek at @andykog's codebase and provide feedback (and/or approve it)? 💪

mweststrate commented 7 years ago

@EricSimons will try to check later today / tomorrow

mweststrate commented 7 years ago

@andykog wot that was quite an endeavour! looking good and idiomatic!

Didn't check all the components, but a small thing I noticed in the stores: ArticleStore has both articles and articlesRegistery. Could articles be expressed as @computed get articles() { return this.articlesRegistery.values() }?

andykog commented 7 years ago

@mweststrate, I think arrays are generally better suited for managing order, but in our case you proposition should work great. Thanks for the review!

andykog commented 7 years ago

(done)

EricSimons commented 7 years ago

@andykog @hodorswit just added you both to the 'offical' repo — also have react-mobx.realworld.io pointed to github pages, so feel free to set up GH pages branch and it will show up live at that URL :)

EricSimons commented 7 years ago

Just added the repo to the main README btw — amazing work guys! 👍 💯

Lmk when you have the GH pages set up & I'll close out this issue

robbiedhickey commented 7 years ago

@EricSimons The demo is running via gh-pages at the following URL https://gothinkster.github.io/react-mobx-realworld-example-app 👍

For some reason the https://react-mobx.realworld.io URL is 404'ing. Is it worthwhile to troubleshoot this or do you think the default gh-pages link is fine?

anishkny commented 6 years ago

https://react-mobx.realworld.io is up now