Vue – v-model with two-way data binding in custom component

Vue offers very nice binding and events system. We can create component, set some data using props, and also emit events from that component. If you read official Vue documentation, you can see examples for some standard form inputs. These examples using v-model and allows two-way binding without any additional code and without creating methods for events in parents – of course, we can still watch data from v-model. Can we use v-model way also in our custom components? Yes, it’s possible and very simple to do. See some examples.

Continue reading “Vue – v-model with two-way data binding in custom component”

SweetAlert2 – Do not prompt in the future

NPM repository is great too, where we can find a lot of very good tools. On of them is SweetAlert2. Library to qucikly implement dialogs with errors, success messages or question. This library also allows to implement simple forms, like question about youir name with input, selection field, radio, files upload or other, custom template. This small tutorial is how to add “do not prompt in the future” to SweetAlert2 dialog. It’s vary simple, but some dev can be confused, how to add this, because it’s in conflict with some build-in options.

Continue reading “SweetAlert2 – Do not prompt in the future”

Gravel – probably the best bike in the world

Gravel bikes

I wrote about road bike and CX bike comparison about two years ago. I wrote also about comparison CX bike and mountain bike. In my opinion, CX bike can be good alternative for both of them. After these two years, my opinion is the same. I have some additional observations: gravel bikes are better. And it’s probably the best bike in the world, most universal, the best for most of the users. Especially for cyclist from my country, from Poland, when “MTB is the king”. But things change, and it seems that gravels will be the most popular bike type. Read to see why.

Continue reading “Gravel – probably the best bike in the world”

Vue dynamic, async components (lazy load)

Vue is very nice framework that allows us to simply and quickly create apps. After many many hours and after hundreds of lines, our app can be big, really big. It’s bad for user experiences, because of long loading and delays. If we use a lot of components and many of them are rendering conditionally, we can load them asynchronously, as other chunks. How do this? It’s very simple, we must just import required files not always, but only on demand – something like lazy loading. Everything is build-in, so we only have to make only few small changes.

Continue reading “Vue dynamic, async components (lazy load)”

Why I decided to stop racing

Road bike racing

Last time I post about this year edition of Uraz Cross Bike race. It was my first race in this year and it was difficult. It was first and… I think the last one in this year. Why? After this race, I decided to stop, to rest and cancel my starts for this year. I feel tired, maybe burnout and should stop for some time. Also, decided to write this post about racing on amateur level, and why I should stop here. Racing are great, but also have a lot of disadvantages. Of course, you can’t agree with me, but just read me arguments. I don’t want to discourage anyone – it’s only my decision and my point of view.

Continue reading “Why I decided to stop racing”