{"id":29838,"date":"2023-02-02T23:02:04","date_gmt":"2023-02-03T07:02:04","guid":{"rendered":"https:\/\/coderpad.io\/?p=29838"},"modified":"2023-08-04T13:20:06","modified_gmt":"2023-08-04T20:20:06","slug":"code-challenge-vue-reusable-input-component","status":"publish","type":"post","link":"https:\/\/coderpad.io\/blog\/coding-challenges\/code-challenge-vue-reusable-input-component\/","title":{"rendered":"Code Challenge: Vue Reusable Input Component"},"content":{"rendered":"\n<p>Vue is a popular JavaScript library for building frontend applications and user interfaces. It builds on HTML, CSS and JavaScript and employs a declarative model for building components. You can try out Vue on the <a href=\"https:\/\/app.coderpad.io\/sandbox?pt=vue\">Vue CoderPad sandbox<\/a> to have a feel of the library.<\/p>\n\n\n\n<p>For this tiny interview, you have two tasks to perform on this Vue application:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Implement a two-way binding so the <code>BaseInput.vue<\/code> can be used for entering data by using the v-model directive.<\/li>\n\n\n\n<li>Conditionally render the value that has been entered into the input when it is not empty. <\/li>\n<\/ul>\n\n\n\n<p>Please see the instructions written directly in the pad to proceed:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>\ud83d\udca1&nbsp;Remember to share your solution with the hashtag #CoderpadTinyInterviews on Twitter and LinkedIn.<\/p>\n<\/blockquote>\n\n\n<div\n\tclass=\"sandbox-embed responsive-embed  sandbox-embed--full-width\"\n\tstyle=\"padding-top: 125%\"\ndata-block-name=\"coderpad-sandbox-embed\">\n\t<iframe src=\"https:\/\/embed.coderpad.io\/sandbox?question_id=240458&#038;use_question_button\" width=\"640\" height=\"800\" loading=\"lazy\" aria-label=\"Try out the CoderPad sandbox\"><\/iframe>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Code Challenge solution<\/h2>\n\n\n\n<p>Verify your solution with the official solution in this\u00a0<a href=\"https:\/\/app.coderpad.io\/sandbox?question_id=240892\">sandbox<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">More resources<\/h2>\n\n\n\n<p>We have made available an extra resource to improve your Vue coding skills:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/coderpad.io\/interview-questions\/vue-interview-questions\/\">25+ interview questions for Vue<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"markdown-want-to-conduct-interviews-on-this-platform\">Want to conduct interviews on this platform?<\/h2>\n\n\n\n<p>Check out CoderPad : pick any interview question or create your own, then invite your candidate to a shared live-coding session on an IDE like this one. You even get 2 free interviews per month forever using&nbsp;<a href=\"https:\/\/app.coderpad.io\/register?source=Tiny+Interviews\">this registration link<\/a>!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Vue is a popular JavaScript library for building frontend applications and user interfaces. It builds on HTML, CSS and JavaScript and employs a declarative model for building components. Test your Vue knowledge by improving the input application in this tiny interview.<\/p>\n","protected":false},"author":1,"featured_media":30056,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[22],"tags":[],"persona":[29],"blog-programming-language":[64],"keyword-cluster":[],"class_list":["post-29838","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-coding-challenges"],"acf":[],"_links":{"self":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/posts\/29838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/comments?post=29838"}],"version-history":[{"count":21,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/posts\/29838\/revisions"}],"predecessor-version":[{"id":35863,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/posts\/29838\/revisions\/35863"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/media\/30056"}],"wp:attachment":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/media?parent=29838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/categories?post=29838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/tags?post=29838"},{"taxonomy":"persona","embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/persona?post=29838"},{"taxonomy":"blog-programming-language","embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/blog-programming-language?post=29838"},{"taxonomy":"keyword-cluster","embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/keyword-cluster?post=29838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}