
ninjaparade @ninjaparade
If you're using @TightenCo ziggy routes with @vuejs 3 composition API, you can write a little plugin to make the `route()` method available in your app by doing this. https://t.co/4d4vU44Dz5
ninjaparade @ninjaparade
If you're using @TightenCo ziggy routes with @vuejs 3 composition API, you can write a little plugin to make the `route()` method available in your app by doing this. https://t.co/4d4vU44Dz5
Markus Oberlehner 🇪🇺 @MaOberlehner
⚡️ When naming your components, always form a sentence like "A Link with an Image" = LinkImage. "A List with Checkmarks" = ListCheckmark. The resulting names may seem less natural, but it greatly helps with organizing your components. https://t.co/JfSB3KazEt
Boris Lepikhin @lepikhinb
@reinink @inertiajs @LaraconOnline I love how easy it is to preserve request params even after page reloading. Though it can also be done with a Controller, this way looks more re-usable for me. @inertiajs https://t.co/UxNJ7hbVoB
Jeff Madsen @codebyjeff
Today I learned: Vue (and prolly all js frameworks) can pass functions as props. Meaning, if you have a generic child component, you can *inject* things like validation rules. Just like a real language! I'll do a quick code blog explaining more later on. https://t.co/3SqaWXbG8f
EGOIST @_egoistlily
If you want to publish .vue on npm directly, try vue-compile, which compiles the blocks in Vue single-file components to use JS/CSS instead of Babel/Sass/Stylus. https://t.co/XJ0Uazt4Bn https://t.co/ANZAVTbEqf
Andrew Schmelyun @aschmelyun
This took me a while to realize, but in Vue every emitted value can be passed through to a method by using $event. That way, you can pass through both the emitted value and something like an ID ? https://t.co/1H1ZIvkotj
Raul @rcubitto
Vuejs + Webstorm tip: if you want your IDE to recoginize paths starting with @ (i.e., "@/components/Button"), you can configure Webpack in your project to point to the `cli-service` config file. #vue ?? https://t.co/u1swRFYxRD
Jonathan Reinink @reinink
✨ Laravel users, make this small change to your app.js file to auto register your Vue components. The filename becomes the component name. ? Gist here: https://t.co/Y3NjLzgBEI https://t.co/h5ByVNuiR6
wetbread @DCoulbourne
? 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 ? https://t.co/Qmlil4mqHD
Alex Jover Morales @alexjoverm
✍️ 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 ✄ https://t.co/KKiFEY1dms
Sidrit Trandafili @strandafili
? 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 :) https://t.co/7MMUOzAwpi
Caleb Porzio @calebporzio
?? 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. https://t.co/Hqd1XthsKn
Andrew Schmelyun @aschmelyun
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) https://t.co/Q7Feh99sQU
Adam Wathan @adamwathan
? When working with JS transition hooks in @vuejs, consider creating dedicated transition components with tailored APIs. It makes your JS-based transitions super easy to reuse and avoids cluttering the parent component with a bunch of transition-specific methods ?? https://t.co/ov4ljXe3LD
Andrew Schmelyun @aschmelyun
Need a simple way of determining whether a user scrolled to the bottom of a div in #VueJS? Check it out! https://t.co/brNIHWuapx
Stuart Nelson @stuartjnelson
Magical! Super nice tecnique for dynamic Vue components https://t.co/3yYfq4O00G
Simon Kollross @skollro
? #VueJs #JavaScript Tip: Use filters to map application constants to human readable values ? https://t.co/Zg3Ch3qzD8 https://t.co/wNAFjycJGN
Adam Wathan @adamwathan
? @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! ? https://t.co/eVErHL1S2O
Adam Wathan @adamwathan
? 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 ?? https://t.co/097FSL4ZYh
Philipp Kühn ??♂️ @_philippkuehn
@adamwathan funfact: you can also use collect() to pass data to vue. a bit shorter ? <user-profile :user="{{ collect($user) }}"></user-profile>