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

Dropchop w/ React.js + Redux #268

Open
alukach opened this issue Mar 8, 2017 · 2 comments
Open

Dropchop w/ React.js + Redux #268

alukach opened this issue Mar 8, 2017 · 2 comments
Labels

Comments

@alukach
Copy link
Member

alukach commented Mar 8, 2017

I've been doing some work with React.js and Redux and have been really enjoying it.
In Redux, you are serializing and storing the entire app state into a single object. This serves well when you have the same data represented in multiple places. Additionally, there is the concept of Actions that you send through a Reducer which alters the app's state.

I feel like the concepts fit in well with Dropchop. The actions could apply easily to data operations (eg "Buffer" or "Load from URL"). Storing the entire app state in a single object would make it easy to do things like sync data between the map and layerlist (this may not be a super big win, but could be helpful if you were doing something like toggling visibility or syncing the map's layer order with the layer list's layer order). Finally, by there are some new features that would be super easy such as storing the app state in localstorage allowing state to persist between sessions or storing state in an observable that can be rewound making for easy undo/redo.

This project hasn't been touch for quite some time. Any thoughts regarding me taking a stab at refactoring it to fit the architecture? I've done a quick test with this and it's been going pretty quickly.

@mapsam
Copy link
Member

mapsam commented Mar 8, 2017

Sounds good to me @alukach! Excited to follow along. Want to work off a react branch for now? We may be able to set up react.dropchop.io so you can work off a real domain.

@alukach
Copy link
Member Author

alukach commented Mar 9, 2017

Great, glad to have the support. If you'd like to follow along (or participate), I've created a branch here: https://github.com/cugos/dropchop/tree/react-redux . I've basically nuked everything and will be porting features over through PRs. I'll be branching off of react-redux and creating feature branches prepended with react/, such as https://github.com/cugos/dropchop/tree/react/modal-form. Perhaps I should create an in-progress PR so people can comment on code if they're interested in getting involved.

Not sure if we can serve two gh-pages from the same repo? I'm okay with just running the local server now.

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

2 participants