gh-board
gh-board copied to clipboard
[WIP] using redux
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
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.
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