Skip to content
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

Docs need one or more diagrams #653

Closed
wmertens opened this issue Aug 29, 2015 · 32 comments
Closed

Docs need one or more diagrams #653

wmertens opened this issue Aug 29, 2015 · 32 comments
Labels

Comments

@wmertens
Copy link
Contributor

There is no diagram explaining the flow in Redux.

I had some success explaining it with this diagram:
redux flow

I'd be happy to provide this in png or svg, with any changes you would like.

@Johnius
Copy link

Johnius commented Aug 29, 2015

Awesome! Thank you!

@alkhe
Copy link
Contributor

alkhe commented Aug 29, 2015

I like your diagram, but the shadows and gradients feel a little gaudy. Maybe you could use solid colors instead?

/2cents

@Johnius
Copy link

Johnius commented Aug 30, 2015

What is selector?

@alkhe
Copy link
Contributor

alkhe commented Aug 30, 2015

@Johnius It's what the Connnector uses to make the state more specific and cache the previous value.

@Johnius
Copy link

Johnius commented Aug 30, 2015

@edge It's a connect() function? I didn't remember the caching possibility in there. Or it's a library?

@alkhe
Copy link
Contributor

alkhe commented Aug 30, 2015

@Johnius It doesn't cache by itself, but React does. It implements shouldComponentUpdate by using the old props and doing a shallow equality check on the new props, essentially doing a cache check.

@timdorr timdorr added the docs label Aug 30, 2015
@wmertens
Copy link
Contributor Author

@svnlto
Copy link

svnlto commented Sep 16, 2015

I found this one quite helpful. no mention of selectors however.
Redux Diagram

@peteruithoven
Copy link
Contributor

@Sigmus
Copy link

Sigmus commented Dec 30, 2015

The above diagram for convenience:

image

@thongly
Copy link

thongly commented Jan 10, 2016

Awesome diagrams! Perhaps a flux vs redux diagram would be helpful in explaining the differences between the two as well - and how the presentation components (react) are still entirely separate. Perhaps this belongs in the early parts of the motivation docs, @gaearon

@henriquesosa
Copy link

@thongly I'm working in a draft to represent both flux and redux architecture.

@Lassi
Copy link

Lassi commented Jan 26, 2016

You can find diagrams representing Flux/Redux and other unidirectional data flow architectures here

@gaearon
Copy link
Contributor

gaearon commented Apr 13, 2016

Courtesy of http://makeitopen.com/tutorials/building-the-f8-app/data/:

@adamdonahue
Copy link

This diagram gives the impression that only the action type is passed to the dispatcher, rather than the action.

Adam

On Apr 13, 2016, at 2:15 PM, Dan Abramov [email protected] wrote:

Courtesy of http://makeitopen.com/tutorials/building-the-f8-app/data/:


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

@wmertens
Copy link
Contributor Author

I like the f8 one, it only has three main components but shows there is more going on.

@gaearon
Copy link
Contributor

gaearon commented May 4, 2016

Also these are really nice (from http://slides.com/jenyaterpil/redux-from-twitter-hype-to-production#/):

Basic Flow

Side Effects

Side Effects with API Middleware

@aweary
Copy link
Contributor

aweary commented May 4, 2016

@gaearon I like those, with the exception of the "Dispatcher" which AFAIK doesn't exist in Redux and kind of confuses it with Flux.

@gaearon
Copy link
Contributor

gaearon commented May 6, 2016

Yeah, it probably should’ve been “Dispatch Function”.

@josefbetancourt
Copy link

josefbetancourt commented Aug 14, 2016

The diagram found here would fit in perfectly in a "counter" tutorial: http://kenev.net/2015/09/06/redux-counter-sample-diagram/

Image not found. archive: https://web.archive.org/web/20160805065602/http://kenev.net/images/2015/09/redux-counter.png
Article archive: https://web.archive.org/web/20161005091221/http://kenev.net/2015/09/06/redux-counter-sample-diagram

The diagram is built in conjunction with the prose.

@timdorr
Copy link
Member

timdorr commented Sep 4, 2016

Rolling up into #1785 for now. Please keep an PRs with diagrams coming!

@timdorr timdorr closed this as completed Sep 4, 2016
@reduxjs reduxjs deleted a comment from xgqfrms-GitHub Jul 3, 2017
@reduxjs reduxjs deleted a comment from xgqfrms-GitHub Jul 3, 2017
@reduxjs reduxjs deleted a comment from xgqfrms-GitHub Jul 6, 2017
@reduxjs reduxjs deleted a comment from imvetri Jul 6, 2017
@markerikson
Copy link
Contributor

I really like this diagram:

Found in this article: http://codesheep.io/2017/01/06/redux-architecture/

@yadielar
Copy link

yadielar commented Feb 25, 2018

Here's a diagram I made inspired by the one @gaearon shared from @terpiljenya slides.

redux-diagram__1300x1434

@victorvhpg
Copy link

my simple diagram:
Redux

@havesomeleeway
Copy link

havesomeleeway commented Jan 13, 2019

screenshot 2018-12-29 at 8 12 48 am

A high-level overview of how state can be mutated in redux. This screenshot is from a Udemy course by Stephen Grider

If you are interested in reading more about state mutation in redux:
https://redux.js.org/recipes/structuring-reducers/immutable-update-patterns

If you're interested in his course:
https://www.udemy.com/react-redux/

@xgqfrms
Copy link

xgqfrms commented Jun 19, 2019

I'm looking forward the official data-flow diagram...

just like vuex did.

image

https://vuex.vuejs.org/
https://vuex.vuejs.org/vuex.png

@stg101
Copy link

stg101 commented Jun 24, 2019

Also these are really nice (from http://slides.com/jenyaterpil/redux-from-twitter-hype-to-production#/):

Basic Flow

Side Effects

Side Effects with API Middleware

Hello, I like your graphics. How you have made them?

@imvetri
Copy link

imvetri commented Jun 25, 2019

@gaearon I really like the animation, which tool did you use ?

@xgqfrms
Copy link

xgqfrms commented Jun 25, 2019

@imvetri I think Microsoft PowerPoint animation is enough do that!

demo

ppt-animation

the ppt file of demo

@i-mw
Copy link

i-mw commented May 3, 2020

Ok.. my turn ..
Created it off flux flow diagram..

redux-diagram (1)

@renelink
Copy link

renelink commented Aug 23, 2021

@gaearon I really like the animation, which tool did you use ?

I was also interessted in the tool that @stg101 used but had no success to find a good one and Power Point is a bit weird.

Thus I did it with pure SVG. No fancy editor needed. Take a look at https://codepen.io/rene-link/pen/LYLYVVR

@markerikson
Copy link
Contributor

FWIW, I did both of the new animated diagrams in the Redux tutorials using PowerPoint:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests