🔥 Ever get frazzled trying to escape a PHP primitive as a string for a Vue prop? Try this Blade directive instead: https://t.co/znauQkUN1I

Laravel
Vue.js

Separating your business/presentation logic in #VueJS components with a "ui" state object makes them a lot easier to understand.

Vue.js

🔥 If you ever seed your Vue components with JSON data in your Blade templates, you *definitely* want to enable double-encoding. Without it, a rogue """ in any user-submitted data might blow up your front end!

Laravel
Vue.js

🔥 Instead of naming your Vue transitions, try combining the default `v-{enter/leave}` classes with separate classes for each enter and leave style. It's much easier to compose different enter/leave transitions on the fly without a new class for every combination 👍🏻

Vue.js

🔥 @vuejs components can be a lot more than just UI widgets! Check out this demo of a "fetch" component for making AJAX requests from your markup: https://t.co/ysBUU1bLUN Inspired by a conversation with @youyuxi yesterday! 😍

Vue.js

🔥 #VueJs #JavaScript Tip: Use filters to map application constants to human readable values 💯 https://t.co/Zg3Ch3qzD8

Vue.js

Need a simple way of determining whether a user scrolled to the bottom of a div in #VueJS? Check it out!

Vue.js

Global variables across your entire Vue app w/o importing a config into each component is easy with webpack's DefinePlugin! (This is setup w/ Laravel's mix compiler, but works with vanilla webpack)

Laravel
Vue.js

🧳🧳 It's soooo easy to persist Vuex state to localStorage - just add this one line to your store... This makes it so you can refresh the page and all the changes you made will remain intact.

Vue.js

🔥 If you want to turn on Devtools when developing @laravelphp #nova packages, set the the @vuejs devtools config key to *true* when Nova is booting. Happy coding :)

Laravel
Vue.js
Browsers

✍️ Gotcha: If you access an instance property within the dynamic import function on a computed prop, it won't work. ✅ You must do it outside so that @vuejs is aware of that dependency. This is commonly used for dynamic components and code splitting ✄

Vue.js

🔥 Writing that extra line that just has a return statement to return an object in my Vue component's data() method feels really bad every time. (Not to mention that data() is a method, not just an object 🤔) So I found a way to trim 2 lines using arrow functions 🚨

Vue.js

The tweet will be reviewed and posted as soon as possible

{{ newSnippetForm.errors.url[0] }}

{{ newSnippetForm.errors.categories[0] }}