Click here to Skip to main content
15,890,609 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
it kind of confuse me. why Vuex use const to declare the variable store. this data in store can be changed.

What I have tried:

it kind of confuse me. why Vuex use const to declare the variable store. this data in store can be changed.
Posted
Updated 16-Nov-18 2:19am
Comments
Richard MacCutchan 16-Nov-18 4:31am    
What?

1 solution

A const variable indicates that you don't want that variable to change by assigning it a new value after it has been created.

This has nothing to do with the activity of that "object" be it a "store" which you can change it's contents.

So you can't change the store, but you can change it's contents.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900