-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mobx-starter] Example with optional isomorphism #148
Comments
Really cool! Gonna try to take a closer look later today |
Documentation was written on the spot, eventually I will add some proper docs. I will also add authentication / account management, sessions and a chat box (socket example) to it. That should cover most cases. |
Tops! See also https://twitter.com/mweststrate/status/706922018730541056 :) |
I guess I can't back down anymore. Thanks Obama! |
:) |
@mweststrate don't let him back down! :) |
@rickmed I have just added mongo support with user registration and auth. I'm trying to emulate Flux/Redux's unidirectional flow in different way. In the case of redux, you have actions, a dispatcher and reducers. Here we just have actions, which are just namespaced functions (namespace = action filename) that affect the state. All the re-rendering is taken care by mobx so you can only focus on two things:
[Edit] Sorry had to remove it guys cos it contained some "work related" code :( Enjoy whoever got a shot at it ! |
@nightwolfz |
Closed the issue. It's not available anymore 😢 |
RIP someone already clone it?? ... |
It's not that hard to re-create a simple version of it. The basis for it is in https://github.com/nightwolfz/ryan (the You will need your context to contain two things: your You just have to figure out how to pass that If your components end up looking like this:
You're are on the right path. |
Github has made us lazy! not body forked before 'The Grant Delete' :-( Is a lost for "HumanityX" We still have ryan. And Yes! I already forked it :-) Let´s see if "slow brainers" like me can assemble 'MobX, 'React-router async', '...' puzzle. The mobx-starter poster for for nostalgics. UPDATE: |
@bySabi that README is awful :) I updated it a bit right before removing everything |
@nightwolfz I update 'poster' :-) |
I've just pushed an example with optional isomorphism and a nice way to structure your application.
All components get access to the state and all methods that affect the state (actions)
State is stored in one giant JSON object.
When state changes, components are re-rendered.
https://github.com/nightwolfz/mobx-starter
Inspired by one of the comments here asking for more examples, still a work in progress.
Enjoy !
This is a watered down version of what I'm using for https://instmsg.com/ (under development, over 100+ actions, 100+ components, sockets/MQTT...). Super maintainable so far :)
The text was updated successfully, but these errors were encountered: