Categories
Storytime

story: That moment – VueJS

Has this ever happened to you? Talking alone, same to me, but remotely.

Just a normal day working with VueJs when curiosity strikes me: assuming the code happens within a Vue component, is it possible to generate a Vue component with vanilla js?

And the answer is …wait for it… ask Stack Overflow! Well… I kinda did this:

Question asked on stack overflow

Waited for a week while letting my brain passively trying to fix this issue somehow.

About two weeks later an answer pops in, a good one, tada!

It turns out that you can do the component generation via Vue.compile()

Answering myself on stack overflow

What can I say at this point?

Thank you future self for helping me out. I’m counting this as a win! 🙂

Question link on StackOverflow.

Note:

I’m not really a true master of Vue.js but the answer I found fulfilled my request. Downvoting requires an explanation

My point being:

Even if you think no one will answer your question, and it might not, you asking the question, or even better, finding and sharing the answer does help the community a lot.

Leave a Reply

Your email address will not be published. Required fields are marked *