-
Notifications
You must be signed in to change notification settings - Fork 2.1k
chore: Remove every call to the global variable (part 2) #1624
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
Conversation
pkarw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DavidRouyer won’t it be better than having rootStore.state.config.cart.synchronize_totals (violates Demeter Principle) to have just single line after toot store is imported:
config = rootStore.state.config
?
|
I'd prefer people to use the rootState and get used to it, and the store is only used to read the state, but I can change it if you want! |
|
@DavidRouyer I don't like such a long statements (i mean Please change it if You could and let me know when it's ready to be merged in? |
|
@pkarw I've addressed your feedback, can't do better in multistore.js because prepareStoreView already contains a config parameter |
|
Hm, I can't do that because I'm passing it by value and not by reference :/ |
|
That’s fine. Can I merge it in? |
|
I've made a lot of clean up, now the config is loaded once in app.ts. I can't use the |
pkarw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK,
I got it.
We can leave it as it is
Related issues
Issue #1540
Continuation of #1613
Streamined bodybuilder version & fixed bodybuilder types
Short description and why it's useful
Screenshots of visual changes before/after (if there are any)
Screenshot of passed e2e tests (if you are using our standard setup as a backend)
(run
yarn tests:e2eand paste the results. If you are not using our standard backend setup or demo.vuestorefront.io you can ommit this step)Contribution and curently important rules acceptance