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

Added easy-peasy global store #713

Merged
merged 1 commit into from
May 19, 2020
Merged

Added easy-peasy global store #713

merged 1 commit into from
May 19, 2020

Conversation

dusanradovanovic
Copy link
Contributor

@dusanradovanovic dusanradovanovic commented May 18, 2020

Description:

This PR adds global state in the form of easy-peasy store. This global state will eventually be the only source of information for all user related info like authorization token, username, language selection etc. These information will be consumed by other components through the hooks that store exports.

Since other components are fetching and storing their own user info (like auth token) global store is currently implemented to "sync up" and follow that info through the system of events on window object. This mechanism will eventually be removed once all components that are using network calls are converted to functional components.

This also fixes the issue where user didn't see the navigation bar upon the first visit to the site.

Linting:

  • No linting errors

Tests:

  • E2E tests (npm test run with e2e)
  • Manual tests
  • Accessibility tests (no new react-axe errors in console)

Documentation:

  • Requires documentation updates
  • Requires Storybook component updates

@shaunmaharaj shaunmaharaj merged commit a8ed71b into master May 19, 2020
@shaunmaharaj shaunmaharaj deleted the global-store branch May 19, 2020 14:35
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.

5 participants