Reactivity in Depth
When using computed get/set properties we always expect to provide set function to accept new added object base on user.
But did you KNOW?
Computed get/set properties works even if there’s no set function?
NO its not working!! It will give an ERROR: Computed property “users” was assigned to but it has no setter.
How it will works:
1. Import scripts.
2. Create div and assign id to app.
- Create new Vue instance and assign it to app.
2. Create store from Vuex instance.
- The undefined store in instruction 1 is now resolved.
- Define users as array in state.
- Assign state users to getters.
- In actions create function getUser to request list of users.
- Actions commit mutations.
3. Add component using Vue instance (make sure name from html and component are the same).
Now your HTML and JS is complete, you can try adding new name by clicking the plus (+) button.
It will display simple input and just enter name.
You will see that the new added name in the user list without getting any warnings/errors.
How Changes Are Tracked: https://vuejs.org/v2/guide/reactivity.html
Looking for a JOB? Signup @ jobbhy and be notified!
Want to post a JOB as employer? Contact and be one us!
Axios Refresh Token (A simple and straightforward request interceptor.)
ASP.NET Core & VueJS Starter kit https://github.com/Ethan0007/aspnetcore-vue-starterkit
Looking for a asynchronous modular micro-framework Reser https://github.com/rhaldkhein/reser
by RhaldKhein https://github.com/rhaldkhein/