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

Use Vuex where feasible to access app state in Vue components #1294

Merged
merged 9 commits into from
Apr 15, 2024

Conversation

anttimaki
Copy link
Collaborator

No description provided.

The lack of type support from Vuex makes this kinda sad though.
Read the active game, selected profile and settings object from Vuex.
Change the last places where activeGame is accessed via GameManager to
use Vuex instead. After this two components still access GameManager
directly:

- GameSelectionScreen, which uses the classes' methods, not just the
  activeGame (these should be removed later though)
- SettingsLoader, which is a special case where we want to be as
  fault-averse as possible. Adding Vuex to this feels like a bad
  choice

GameManager is still accessed directly in non-component files.
Using warn for a event that oocurs every time user accesses the profile
selection view for the first time is overkill.
Base automatically changed from prewarm-mod-cache to develop April 15, 2024 06:43
@anttimaki anttimaki merged commit 13ec42d into develop Apr 15, 2024
6 checks passed
@anttimaki anttimaki deleted the access-state-via-vuex branch April 15, 2024 06:44
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.

1 participant