{"id":103471,"date":"2020-04-11T15:15:00","date_gmt":"2020-04-11T12:15:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=103471"},"modified":"2022-11-04T10:35:46","modified_gmt":"2022-11-04T08:35:46","slug":"reactjs-checkboxes-example","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html","title":{"rendered":"ReactJS Checkboxes Example"},"content":{"rendered":"<p>In this article we take a look at using checkboxes in a ReactJS Application. ReactJS has become the go to library for front-end development. It has grown from strength to strength and has won over support from the community of developers. A great ecosystem of libraries and components to support and speed up ReactJS development has sprung up. We look to create a reusable component of our own in this example. The concepts shown here can be used as is in the development of other required components in your ReactJS applications.<\/p>\n<p>So without further ado let us get started with our example.<\/p>\n<p>We start off with a list of tools and technologies used in this example. And ending with a ReactJS example describing the concepts of creating a reusable component.<\/p>\n<h2 class=\"wp-block-heading\">1. Tools and Technologies<\/h2>\n<ul class=\"wp-block-list\">\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.npmjs.com\/package\/create-react-app\" target=\"_blank\">create-react-app<\/a><\/li>\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/reactjs.org\" target=\"_blank\">ReactJS<\/a><\/li>\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\">Visual Studio Code IDE<\/a><\/li>\n<\/ul>\n<p>The create-react-app package from the folks at Facebook allows us to quickly generate a ReactJS application structure. It pulls down the latest version of ReactJS as well. Visual Studio Code IDE is my editor of choice for JavaScript development. Although you are free to follow along in an editor of your choice.<\/p>\n<h2 class=\"wp-block-heading\">2. Project Structure<\/h2>\n<p>We use the create-react-app package as follows to generate our ReactJS application<\/p>\n<pre class=\"brush:bash;\">&gt;npx create-react-app my-app\n<\/pre>\n<p>The npx command downloads a temporary copy of create-react-app and runs it with the parameters provided. It disposes of the create-react-app package once done. Once the command completes our new project should look like below:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"240\" height=\"314\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2020\/04\/ReactJS-Checkboxes-Project-Structure.jpg\" alt=\"ReactJS Checkboxes - Project Structure\" class=\"wp-image-103637\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2020\/04\/ReactJS-Checkboxes-Project-Structure.jpg 240w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2020\/04\/ReactJS-Checkboxes-Project-Structure-229x300.jpg 229w\" sizes=\"(max-width: 240px) 100vw, 240px\" \/><figcaption>Project Structure<\/figcaption><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\">3. Checkbox Component<\/h2>\n<p>Let us create a component, Checkbox, that will render an input tag of type checkbox. We will use this component in different modes as a Controlled as well as Uncontrolled Component. This component resides in a file called Checkbox under the Components folder. And the code for this component looks like below:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><span style=\"text-decoration: underline\"><em>Checkbox.js<\/em><\/span><\/p>\n<pre class=\"brush:js;\">import React from 'react';\n\nfunction Checkbox(props) {\n    const { left, right, text } = props;\n    return &lt;div style={{ display: 'flex' }}&gt;\n        {left &amp;&amp; &lt;label&gt;{text}&lt;\/label&gt;}\n        &lt;input type=\"checkbox\" {...props} \/&gt;\n        {right &amp;&amp; &lt;label&gt;{text}&lt;\/label&gt;}\n    &lt;\/div&gt;;\n}\nexport default Checkbox;\n<\/pre>\n<p>Now let us use this component in another component called MyComponent. The code for MyComponent looks like below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>MyComponent.js<\/em><\/span><\/p>\n<pre class=\"brush:js;\">import React, { useState } from \"react\";\nimport Checkbox from '.\/Checkbox';\nfunction MyComponent(props) {\n    const [checked, setChecked] = useState(false);\n    const handleChecked = ({ target }) =&gt; {\n        setChecked(target.checked);\n    }\n    return &lt;div style={{\n        display: 'flex',\n        flexDirection: 'column',\n        height: '100vh',\n        width: '100vw',\n        justifyContent: 'center',\n        alignItems: 'center'\n    }}&gt;\n        &lt;Checkbox right=\"true\" defaultChecked={true} \ntext=\"Check Me\" style={{ marginTop: '5px' }} \/&gt;\n        &lt;Checkbox left=\"true\" text=\"Check Me\" \nstyle={{ marginTop: '6px' }} \/&gt;\n        &lt;Checkbox right=\"true\" text=\"Check Me\" \nstyle={{ marginTop: '5px' }} \/&gt;\n        &lt;Checkbox left=\"true\" onChange={handleChecked} \nchecked={checked} text=\"Check Me\" style={{ marginTop: '6px' }} \/&gt;\n    &lt;\/div&gt;\n}\nexport default MyComponent;\n\n<\/pre>\n<p>Now let us use this component and to do that we modify the index.js file suitably. The modified index.js file with changes should look like below.<\/p>\n<p><span style=\"text-decoration: underline\"><em>index.js<\/em><\/span><\/p>\n<pre class=\"brush:js;\">import React from 'react';\nimport ReactDOM from 'react-dom';\nimport '.\/index.css';\nimport Checkbox from \".\/Components\/Checkbox\";\nimport * as serviceWorker from '.\/serviceWorker';\n\nReactDOM.render(\n  &lt;React.StrictMode&gt;\n    &lt;MyComponent \/&gt;\n  &lt;\/React.StrictMode&gt;,\n  document.getElementById('root')\n);\n\n\/\/ If you want your app to work offline and load faster, you can change\n\/\/ unregister() to register() below. Note this comes with some pitfalls.\n\/\/ Learn more about service workers: https:\/\/bit.ly\/CRA-PWA\nserviceWorker.unregister();\n\n<\/pre>\n<p>As you can see from the above we have reused our Checkbox component twice as an uncontrolled component. Once we show the label to the left of it and once to the right. Apart from setting other props on the component like style. <\/p>\n<p>We have also set a default value for one these components by adding defaultChecked props like below:<\/p>\n<pre class=\"brush:js;\">&lt;Checkbox right=\"true\" defaultChecked={true} text=\"Check Me\" \nstyle={{ marginTop: '5px' }} \/&gt;\n<\/pre>\n<p>We have also made them controlled components, using an onChange handler and binding the checked attribute to state property.<\/p>\n<h2 class=\"wp-block-heading\">4. Running the application<\/h2>\n<p>Let us run our code to see all of this in action. We run the below command to launch our application:<\/p>\n<pre class=\"brush:bash;\">\/my-app&gt;npm start\n<\/pre>\n<p>The UI of our application should look like below:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"724\" height=\"698\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2020\/04\/Project-Output-Checkboxes-Demo.jpg\" alt=\"ReactJS Checkboxes - Project Output\" class=\"wp-image-103650\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2020\/04\/Project-Output-Checkboxes-Demo.jpg 724w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2020\/04\/Project-Output-Checkboxes-Demo-300x289.jpg 300w\" sizes=\"(max-width: 724px) 100vw, 724px\" \/><figcaption>Project Output<\/figcaption><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\">5. Download the Source Code<\/h2>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2020\/04\/JCG-ReactJS-Checkboxes-Example.zip\"><strong>ReactJS Checkboxes Example<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this article we take a look at using checkboxes in a ReactJS Application. ReactJS has become the go to library for front-end development. It has grown from strength to strength and has won over support from the community of developers. A great ecosystem of libraries and components to support and speed up ReactJS development &hellip;<\/p>\n","protected":false},"author":82952,"featured_media":92051,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1903],"tags":[1919],"class_list":["post-103471","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-react-js","tag-reactjs"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>ReactJS Checkboxes Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"In this article we take a look at using checkboxes in a ReactJS Application. ReactJS has become the go to library for front-end development. It has grown\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ReactJS Checkboxes Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"In this article we take a look at using checkboxes in a ReactJS Application. ReactJS has become the go to library for front-end development. It has grown\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-11T12:15:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-04T08:35:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/react-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Siddharth Seth\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Siddharth Seth\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/reactjs-checkboxes-example.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/reactjs-checkboxes-example.html\"},\"author\":{\"name\":\"Siddharth Seth\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/09c54717e2cc7956aa8a2df61330f18c\"},\"headline\":\"ReactJS Checkboxes Example\",\"datePublished\":\"2020-04-11T12:15:00+00:00\",\"dateModified\":\"2022-11-04T08:35:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/reactjs-checkboxes-example.html\"},\"wordCount\":484,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/reactjs-checkboxes-example.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2019\\\/05\\\/react-logo.jpg\",\"keywords\":[\"Reactjs\"],\"articleSection\":[\"React.js\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/reactjs-checkboxes-example.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/reactjs-checkboxes-example.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/reactjs-checkboxes-example.html\",\"name\":\"ReactJS Checkboxes Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/reactjs-checkboxes-example.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/reactjs-checkboxes-example.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2019\\\/05\\\/react-logo.jpg\",\"datePublished\":\"2020-04-11T12:15:00+00:00\",\"dateModified\":\"2022-11-04T08:35:46+00:00\",\"description\":\"In this article we take a look at using checkboxes in a ReactJS Application. ReactJS has become the go to library for front-end development. It has grown\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/reactjs-checkboxes-example.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/reactjs-checkboxes-example.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/reactjs-checkboxes-example.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2019\\\/05\\\/react-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2019\\\/05\\\/react-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/reactjs-checkboxes-example.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Web Development\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/web-development\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JavaScript\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/web-development\\\/javascript\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"React.js\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/web-development\\\/javascript\\\/react-js\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"ReactJS Checkboxes Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/09c54717e2cc7956aa8a2df61330f18c\",\"name\":\"Siddharth Seth\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/86a5133a5e9d79f7997e2649b1afe58e895c0d88df47b3359103ec4c1a2077d6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/86a5133a5e9d79f7997e2649b1afe58e895c0d88df47b3359103ec4c1a2077d6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/86a5133a5e9d79f7997e2649b1afe58e895c0d88df47b3359103ec4c1a2077d6?s=96&d=mm&r=g\",\"caption\":\"Siddharth Seth\"},\"description\":\"Siddharth is a Software Development Professional with a Master degree in Computer Applications from IGNOU. He has over 14 years of experience. And currently focused on Software Architecture, Cloud Computing, JavaScript Frameworks for Client and Server, Business Intelligence.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/siddharth-seth-240180\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/siddharth_seth1980\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ReactJS Checkboxes Example - Java Code Geeks","description":"In this article we take a look at using checkboxes in a ReactJS Application. ReactJS has become the go to library for front-end development. It has grown","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html","og_locale":"en_US","og_type":"article","og_title":"ReactJS Checkboxes Example - Java Code Geeks","og_description":"In this article we take a look at using checkboxes in a ReactJS Application. ReactJS has become the go to library for front-end development. It has grown","og_url":"https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2020-04-11T12:15:00+00:00","article_modified_time":"2022-11-04T08:35:46+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/react-logo.jpg","type":"image\/jpeg"}],"author":"Siddharth Seth","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Siddharth Seth","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html"},"author":{"name":"Siddharth Seth","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/09c54717e2cc7956aa8a2df61330f18c"},"headline":"ReactJS Checkboxes Example","datePublished":"2020-04-11T12:15:00+00:00","dateModified":"2022-11-04T08:35:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html"},"wordCount":484,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/react-logo.jpg","keywords":["Reactjs"],"articleSection":["React.js"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html","url":"https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html","name":"ReactJS Checkboxes Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/react-logo.jpg","datePublished":"2020-04-11T12:15:00+00:00","dateModified":"2022-11-04T08:35:46+00:00","description":"In this article we take a look at using checkboxes in a ReactJS Application. ReactJS has become the go to library for front-end development. It has grown","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/react-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/react-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/reactjs-checkboxes-example.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Web Development","item":"https:\/\/www.javacodegeeks.com\/category\/web-development"},{"@type":"ListItem","position":3,"name":"JavaScript","item":"https:\/\/www.javacodegeeks.com\/category\/web-development\/javascript"},{"@type":"ListItem","position":4,"name":"React.js","item":"https:\/\/www.javacodegeeks.com\/category\/web-development\/javascript\/react-js"},{"@type":"ListItem","position":5,"name":"ReactJS Checkboxes Example"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/09c54717e2cc7956aa8a2df61330f18c","name":"Siddharth Seth","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/86a5133a5e9d79f7997e2649b1afe58e895c0d88df47b3359103ec4c1a2077d6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/86a5133a5e9d79f7997e2649b1afe58e895c0d88df47b3359103ec4c1a2077d6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/86a5133a5e9d79f7997e2649b1afe58e895c0d88df47b3359103ec4c1a2077d6?s=96&d=mm&r=g","caption":"Siddharth Seth"},"description":"Siddharth is a Software Development Professional with a Master degree in Computer Applications from IGNOU. He has over 14 years of experience. And currently focused on Software Architecture, Cloud Computing, JavaScript Frameworks for Client and Server, Business Intelligence.","sameAs":["https:\/\/www.linkedin.com\/in\/siddharth-seth-240180\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/siddharth_seth1980"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/103471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/82952"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=103471"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/103471\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/92051"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=103471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=103471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=103471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}