Let's Build For Ruby and Rails Developers - Part 13 - Enhancing state of the Vue app
Web-Crunch
Hi, My name is Andy Leverenz and I work as a product designer and developer. For fun, I design, code, and write. Check out my blog called Web-Crunch https://web-crunch.com where I publish design and development tutorials with the occasional vlog.
==================== Part 13 - Enhancing state of the Vue.js app
In part 13 I take a step back at our very rough Vue.js application to start to consider state management. There are a few routes we could take when it comes to using a store pattern using Vue.js but the most simple pattern I prefer is the Vue.observable pattern.
If you're new to Vue.js this might be a bit complex but the idea is to mimic the saved state as you navigate a Vue application. This can get tedious as you add more and more components. Having a center "store" (kind of like a database) is a good pattern to adopt as your app scales.
A popular extension to Vue.js is called Vuex which is like the "store" pattern on steroids. That library comes with its conventions and learning curves so I didn't want to go that deep for our purposes. How does the observable pattern work in Vue.js?
The observable pattern lets you have a central store which is a fancy way of saying a stateful object that you can update or change on the fly. A good practice is to also introduce center "actions" that are responsible for changing the store.
Continue reading here: https://web-crunch.com/posts/lets-build-for-ruby-and-rails-developers-part-13
โฅ๏ธ Sponsor me on GitHub https://github.com/sponsors/justalever
โ๏ธ Keep me awake. Buy me a coffee https://www.buymeacoffee.com/webcrunch
๐ฐ One-Click Subscribe: https://www.youtube.com/user/webcrunchblog?sub_confirmation=1
๐ป Previously published at: https://web-crunch.com/posts/lets-build-for-ruby-and-rails-developers-part-13
๐Latest course: HELLO RAILS https://hellorails.io
๐ป Check out the blog: https://web-crunch.com
๐ฆ Check out my personal site: https://justalever.com
๐ Links: Weekly Newsletter: https://digest.web-crunch.com/ Twitter: https://twitter.com/webcrunchblog Github: https://github.com/justalever
๐Check out my book on UX Design: "LUXD: Learn User Experience Design" https://web-crunch.com/products/luxd
๐ Check out my FREE book on Tumblr Theming: "Pro Tumblr Theming" https://web-crunch.com/products/ptt
๐ Ruby on Rails devs, Try HatchBox.io. You'll save upwards of 50% compared to Heroku. I use it and love it! https://hatchbox.io/?via=hellorails
๐ฏ Need awesome web hosting? Check out cloudways. They allow me to use a variety of hosting providers and build apps with ease: http://bit.ly/webcrunchhosting
๐ Need more advanced hosting for Rails, PHP, Node, or other projects? Digital Ocean has you covered. https://m.do.co/c/ee243ee15648 ... https://www.youtube.com/watch?v=cPRROuaCHhU
244171892 Bytes