gh-board icon indicating copy to clipboard operation
gh-board copied to clipboard

[WIP] using redux

Open mathieudutour opened this issue 8 years ago • 2 comments

I worked a bit over the week end to try to simplify the data flow and use redux instead of custom event listeners.

It is still using indexedDB but no components should call it directly. Instead, they should dispatch an action. Also, an action is just a json object, the call to github/database is handle by a middleware. That way, it's easy to debug an action and middlewares can be tested separately and mocked.

There is still a lot of work to do, I'll continue later

mathieudutour avatar Jan 23 '17 12:01 mathieudutour

Cool! I'll try to take a closer look at the code changes this evening.

A coworker mentioned https://github.com/mobxjs/mobx (Getting Started) as an alternative to redux. You only have to edit the store objects directly and mobx handles the re-rendering.

philschatz avatar Jan 23 '17 17:01 philschatz

You only have to edit the store objects directly

Yeah that's why I'm not a fan of it, it's hard to track down what is changing what but tbh, I've never done a big project with it

mathieudutour avatar Jan 23 '17 17:01 mathieudutour