mjftw / react-bitbucket-pull-request-board

React and Redux based project to show the status and activity of all your Bitbucket pull requests in an info board.
MIT License
1 stars 1 forks source link

Refactor to use React Redux #19

Open mjftw opened 4 years ago

mjftw commented 4 years ago

As the app has grown in complexity, the number of props that have had to be passed down through the component tree has kept growing and is now becoming ugly. The App component currently handles all state, but this is also a pretty ugly way to do things when the app state gets larger. Another issue is that the App component is also responsible for instigating data fetches and managing API keys. App component is getting very bloated and definitely does not respect the SRP. Clearly something must be done about this.

To fix this, I'm planning to refactor the entire app to use Redux. This will help as it will allow all state to be moved out of the component tree, and out of the App component. It will also allow data fetching to be moved out into a separate part of the app, and for API keys to not be the App component's responsibility.

If we're going to add support for Github, then the current design complexity would get out of hand. This is non-optional.