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

Implement redux #42

Merged
merged 2 commits into from
Oct 3, 2021
Merged

Implement redux #42

merged 2 commits into from
Oct 3, 2021

Conversation

TaneliR
Copy link
Contributor

@TaneliR TaneliR commented Oct 3, 2021

#40

  • Replaced the 'mitt' library with redux / react-redux
  • Added boilerplate filestructure and configuration for redux
  • Implemented the app-wide login state using redux

I just used the root reducer to store the login status, should be split into multiple files if you find further use for redux.

Sidenote: Found a minor bug while making this.
Steps to replicate:

  • Sign in with an user
  • Sign out
  • Sign in with the same user
  • Sign out
    -> the component is showing and there is no redirect.

Thought my additions were the reason, but tested it in main branch too with same results.

Taneli Riihimäki added 2 commits October 3, 2021 14:01
…in boolean in store. Remove old statehacks and dependencies.
Copy link
Member

@bjarneo bjarneo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This is great. Thank you for your contribution!

@bjarneo
Copy link
Member

bjarneo commented Oct 3, 2021

I will look into that bug. Thanks. Really appreciate this PR. Will most likely add more features that are using redux, so will look into splitting the reducers at that point.

@bjarneo bjarneo merged commit d9b5c8f into HemmeligOrg:main Oct 3, 2021
bjarneo pushed a commit that referenced this pull request Jun 8, 2024
* Add redux, react-redux and some basic structure for it. Hold user login boolean in store. Remove old statehacks and dependencies.

* Cleanup and refactor

Co-authored-by: Taneli Riihimäki <taneli.riihimaki@liveto.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants