Dependency arrays are a very important part of React Hooks. They allow you to indicate what your effects, callbacks, and memos depend on so they can be recalculated only when necessary. For effects, this means your effects will be re-run every time one of your dependencies changes. The way that React determines if a dependency changes might not be the way you think, so you must be careful!
Browsers typically load all of the images on the page as soon as possible. This is called eager loading. Sometimes, it's best if we wait to load images until we need them. This is called lazy loading. Lazy loading is a great technique for speeding up page load times and decreasing page sizes.
I recently saw an amazing way to integrate Vue into a Rails project, and I wanted to share it here! It's a super easy method that makes it dead-simple to pass data from Rails views into Vue componnets. Not only that, but it only requires that you have a single pack entrypoint for all of your Vue components!