I hope you will enjoy this weeksโ issue and if you have any feedback, please get in touch with me on Twitter -ย @mokkapps or via email:ย mail@mokkapps.de.
Have a great week โ๏ธ
Vue Tip: Create custom v-model modifier
v-model has some built-in modifiers like .lazy, .number and .trim. But in some cases, you might need to add your own custom modifier.
In this simple demo, I want to create a custom modifier called no-underscore that removes all underscores _ from an input:
Inside our component we can access the modifier via the modelModifiers prop. We manipulate the value if an input event is fired and the modifier is available:
If your v-model binding includes both modifiers and argument then the generated prop name will be arg + โModifiersโ:
๐ฎ Connor ported Zelda Classic as PWA to the web using WebAssembly. โ๐ป Check out his deeply technical article ๐ฎ Play the game here: https://t.co/DVNDeo65MD