jsheroes/community-help

react - redux architecture examples

alexnm opened this issue ยท 8 comments

Hello clujsers, I'm interested in learning new / different approaches for architecting larger applications with React and Redux and I thought this might be a good place to share some codebase examples. I'm currently working on one and I'll try to have it on github in a few days.

Who wants to join the conversion? :)

hi @alexnm, I really like the idea. I started experimenting with some new approaches on my own but I don't have something solid... yet at least. However, I would really like to see your approach ๐Ÿ‘

Subscribing to this thread ๐Ÿ‘

Maybe we can create a repository here and people can come with different approaches as pull requests. This way we can see all of them in one place :)

It would be great just to discuss first various alternatives and then maybe we can come up with a combined approach

This is my theoretical take on the redux part: https://github.com/alexnm/re-ducks. Will follow-up with a boilerplate / start thingy asap.

Hi Alex, it looks very good. I'll give it a closer read.

What I'd be interested to hear from this conversation is how you're shaping your actions and your state, and how that impacts the reducers.

Case in point: we're currently using FSA actions, but there seems to be a lot of boilerplate in the reducer around the status of the async call (before/in progress / success / failure), and I'm curios how everyone is dealing with that.

As for the state shape, we're splitting each sub-state in ui and data components, with the former keeping transient state (such as list vs. grid view, search term, filter states), and data for the things that come from permanent storage. Any other approaches around this?

Ok, I managed to put this on github, but it's still work in progress: https://github.com/FortechRomania/react-redux-complete-example

Can anyone share other links or examples they have?

Awesome, thanks @alexnm, I'm taking a look. I'm also planning on sharing some architecture guidelines after we sort out some things โ€” right now it's a bit in flux :)