{"id":32729,"date":"2023-03-29T09:00:00","date_gmt":"2023-03-29T16:00:00","guid":{"rendered":"https:\/\/coderpad.io\/?p=32729"},"modified":"2023-08-03T14:16:06","modified_gmt":"2023-08-03T21:16:06","slug":"tiny-interview-react-controlled-input","status":"publish","type":"post","link":"https:\/\/coderpad.io\/blog\/coding-challenges\/tiny-interview-react-controlled-input\/","title":{"rendered":"Code Challenge: React Controlled Input"},"content":{"rendered":"\n<p><a href=\"https:\/\/coderpad.io\/blog\/development\/global-state-management-react\/\">State management<\/a> is a method of controlling communication between different parts of state and their usage, including React components.<\/p>\n\n\n\n<p>The goal of this challenge is to test your knowledge on state management by completing the task items:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Implement a controlled input component, the input fields have been provided already.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Implement a submit functionality on the form, so that when the submit button is clicked, the values of the controlled input component are added to the table below.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The input fields should be cleared immediately the form is submitted.<\/li>\n<\/ul>\n\n\n\n<p>We have provided some template code in the sandbox below that will help you get started. Implement your solution in the sandbox below:<\/p>\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=241229&#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=241232\">sandbox<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">More resources<\/h2>\n\n\n\n<p>We have made available these extra resources to improve your React coding skills:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/coderpad.io\/interview-questions\/react-interview-questions\/\">25+ React interview questions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/coderpad.io\/online-coding-tests\/react\/\">Online coding test questions for React<\/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>State management is a method of controlling communication between different parts of state and their usage, including React components. Test your knowledge on state management by improving the React app in this code challenge.<\/p>\n","protected":false},"author":1,"featured_media":32735,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[22],"tags":[],"persona":[29],"blog-programming-language":[61],"keyword-cluster":[],"class_list":["post-32729","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\/32729","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=32729"}],"version-history":[{"count":14,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/posts\/32729\/revisions"}],"predecessor-version":[{"id":35825,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/posts\/32729\/revisions\/35825"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/media\/32735"}],"wp:attachment":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/media?parent=32729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/categories?post=32729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/tags?post=32729"},{"taxonomy":"persona","embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/persona?post=32729"},{"taxonomy":"blog-programming-language","embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/blog-programming-language?post=32729"},{"taxonomy":"keyword-cluster","embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/keyword-cluster?post=32729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}