I am willing to drop a current angular app, and I am wondering how to use vue in the context where I want to share global infos (like user name, counters, etc)
Every view object should be able to access the data as if it was part of its model. I know
there exists subviews, my question is: what is recommended considering perf or maintainability?
I put this as an issue linked to the documentation, in a chapter like "managing larger apps".
thanks
The recommended approach is: do not share global vars. Pass them down from the root component.
Your root vm can be linked to <body>, there should be no problem (if Angular can handle it then Vue definitely can too).
Great.
Thanks for the answer.
Most helpful comment
The recommended approach is: do not share global vars. Pass them down from the root component.
Your root vm can be linked to
<body>, there should be no problem (if Angular can handle it then Vue definitely can too).