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

Major redux refactor and file restructure #58

Merged
merged 49 commits into from
Jun 5, 2019
Merged

Major redux refactor and file restructure #58

merged 49 commits into from
Jun 5, 2019

Conversation

Ligerx
Copy link
Owner

@Ligerx Ligerx commented May 31, 2019

  • Installed react-redux 7.1.0-rc.1 for hooks. Need to update the version once a stable version is released Update redux to v7.1 stable #59

  • extract all selectors to their relevant duck

  • utilize reselect and re-reselect where relevant

  • replace all relative imports with absolute imports

  • look into getting router props into redux, is it helpful? Doesn't seem too useful right now, and even less so when react router supports hooks

  • get rid of containers and utilize redux hooks

  • use Material-UI style hook where applicable not worth the effort to refactor ALL components. But continue to use the hooks for any new code.

  • get rid of Containers and Pages

  • move selectors and dispatch down to lower components where relevant created Move selectors and dispatch down to lower components where relevant #67 to track this

  • rename redux-ducks to just redux (redux taken, can't think of a better name right now)

  • add typing for the entire state object

  • add typing for redux actions?

  • add typing for selectors?

closes #50, closes #51, closes #53

@Ligerx Ligerx changed the title Install react-redux 7.1.0-rc.1 for hooks Major redux refactor and file restructure May 31, 2019
@Ligerx
Copy link
Owner Author

Ligerx commented Jun 1, 2019

@Ligerx
Copy link
Owner Author

Ligerx commented Jun 1, 2019

If you wanna be super legit about Redux typing, it gets complicated
https://blog.callstack.io/type-checking-react-and-redux-thunk-with-flow-part-2-206ce5f6e705

That said I think VSCode flow integration is kinda broken right now for some reason, so it's difficult to see if any types I'm adding are working... =(

@Ligerx
Copy link
Owner Author

Ligerx commented Jun 1, 2019

Was running into some problems with Flow not starting in VSCode
flow/flow-for-vscode#224

^ that fixed one problem, but hover still doesn't seem to work for me =((((
flow/flow-for-vscode#146

I'm going to have to push off additional typing until after I get Flow fixed

I've created an issue to track this #66

@Ligerx Ligerx marked this pull request as ready for review June 5, 2019 03:27
@Ligerx Ligerx merged commit 601f6e6 into master Jun 5, 2019
@Ligerx Ligerx deleted the redux-refactor branch June 5, 2019 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor redux selectors Refactor redux containers Reorganize file structure
1 participant