{"id":27785,"date":"2022-06-22T14:45:51","date_gmt":"2022-06-22T14:45:51","guid":{"rendered":"http:\/\/create-a-business-card-qr-code-in-react"},"modified":"2022-06-22T14:45:51","modified_gmt":"2022-06-22T14:45:51","slug":"create-a-business-card-qr-code-in-react","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/","title":{"rendered":"Create a Business Card QR Code in React"},"content":{"rendered":"<div class=\"wp-block-cloudinary-markdown \"><p>In recent years, QR codes have become more popular to give out information that used to be printed. Restaurant menus, concert tickets, and even documentation for getting through customs in certain countries have been moved to QR codes. They let us share that info quickly and in a sustainable manner.<\/p>\n<p>One thing that hasn\u2019t gone away is the business card. LinkedIn profiles are nice, but sometimes having that custom card means a little more depending on the environment. Going to online and in-person conferences could definitely benefit from having business cards available. That\u2019s why we\u2019re going to create a QR code we can let others scan to see our business card. No more ordering hundreds of these and packing them everywhere.<\/p>\n<h2>Some basic setup<\/h2>\n<p>The first thing we need to do is create the React app we\u2019ll work with. To do that, run the following command:<\/p>\n<pre class=\"js-syntax-highlighted\"><span><code class=\"hljs shcb-wrap-lines\">$ npx create-react-app qr-card --template typescript\n<\/code><\/span><\/pre>\n<p>This will bootstrap a new React app for us. Next, you\u2019ll need to install the package we\u2019ll be using to generate the custom QR codes, <a href=\"https:\/\/www.npmjs.com\/package\/react-qr-code\">react-qr-code<\/a>. Run the following command:<\/p>\n<pre class=\"js-syntax-highlighted\"><span><code class=\"hljs shcb-wrap-lines\">$ npm i react-qr-code\n<\/code><\/span><\/pre>\n<p>We\u2019ll also be using <a href=\"https:\/\/mui.com\/\">Material UI<\/a> to style the components we\u2019ll work with so run the following command to install these dependencies:<\/p>\n<pre class=\"js-syntax-highlighted\"><span><code class=\"hljs shcb-wrap-lines\">$ npm i @mui\/material @emotion\/react @emotion\/styled\n<\/code><\/span><\/pre>\n<p>This is the only setup we have to do. Let\u2019s jump into the real code.<\/p>\n<h2>Make the business card input<\/h2>\n<p>Go to the <code>src<\/code> directory and add a new directory called <code>components<\/code>. Inside that folder, add a new file called <code>QrGenerator.tsx<\/code>. This is where we\u2019ll have the form to create a business card based on what users enter and we\u2019ll display the generated QR code.<\/p>\n<p>Open this new file and add the following code:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> { useState } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"react\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> QRCode <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"react-qr-code\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> Button <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"@mui\/material\/Button\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> Container <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"@mui\/material\/Container\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> Stack <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"@mui\/material\/Stack\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> TextField <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"@mui\/material\/TextField\"<\/span>;\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">QrGenerator<\/span>(<span class=\"hljs-params\"><\/span>) <\/span>{\n  <span class=\"hljs-keyword\">const<\/span> &#91;qrValue, setQrValue] = useState(<span class=\"hljs-string\">\"placeholding\"<\/span>);\n\n  <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">generateCode<\/span>(<span class=\"hljs-params\">e: any<\/span>) <\/span>{\n    e.preventDefault();\n\n    setQrValue(<span class=\"hljs-string\">`\n        &lt;div&gt;\n            &lt;p&gt;<span class=\"hljs-subst\">${e.currentTarget.fullName.value}<\/span>&lt;\/p&gt;\n            &lt;p&gt;<span class=\"hljs-subst\">${e.currentTarget.jobTitle.value}<\/span>&lt;\/p&gt;\n            &lt;p&gt;<span class=\"hljs-subst\">${e.currentTarget.shortDescription.value}<\/span>&lt;\/p&gt;\n            &lt;p&gt;<span class=\"hljs-subst\">${e.currentTarget.website.value}<\/span>&lt;\/p&gt;\n        &lt;\/div&gt;\n    `<\/span>);\n  }\n\n  <span class=\"hljs-keyword\">return<\/span> (\n    <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">Container<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">form<\/span>\n        <span class=\"hljs-attr\">onSubmit<\/span>=<span class=\"hljs-string\">{(e)<\/span> =&gt;<\/span> generateCode(e)}\n        style={{ marginBottom: \"24px\", width: \"800px\" }}\n      &gt;\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">Stack<\/span> <span class=\"hljs-attr\">spacing<\/span>=<span class=\"hljs-string\">{2}<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">TextField<\/span>\n            <span class=\"hljs-attr\">id<\/span>=<span class=\"hljs-string\">\"fullName\"<\/span>\n            <span class=\"hljs-attr\">label<\/span>=<span class=\"hljs-string\">\"Full Name\"<\/span>\n            <span class=\"hljs-attr\">variant<\/span>=<span class=\"hljs-string\">\"standard\"<\/span>\n            <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"fullName\"<\/span>\n          \/&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">TextField<\/span>\n            <span class=\"hljs-attr\">id<\/span>=<span class=\"hljs-string\">\"jobTitle\"<\/span>\n            <span class=\"hljs-attr\">label<\/span>=<span class=\"hljs-string\">\"Job Title\"<\/span>\n            <span class=\"hljs-attr\">variant<\/span>=<span class=\"hljs-string\">\"standard\"<\/span>\n            <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"jobTitle\"<\/span>\n          \/&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">TextField<\/span>\n            <span class=\"hljs-attr\">id<\/span>=<span class=\"hljs-string\">\"shortDescription\"<\/span>\n            <span class=\"hljs-attr\">label<\/span>=<span class=\"hljs-string\">\"Short Description\"<\/span>\n            <span class=\"hljs-attr\">variant<\/span>=<span class=\"hljs-string\">\"standard\"<\/span>\n            <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"shortDescription\"<\/span>\n          \/&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">TextField<\/span> <span class=\"hljs-attr\">id<\/span>=<span class=\"hljs-string\">\"email\"<\/span> <span class=\"hljs-attr\">label<\/span>=<span class=\"hljs-string\">\"Email\"<\/span> <span class=\"hljs-attr\">variant<\/span>=<span class=\"hljs-string\">\"standard\"<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"email\"<\/span> \/&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">TextField<\/span>\n            <span class=\"hljs-attr\">id<\/span>=<span class=\"hljs-string\">\"website\"<\/span>\n            <span class=\"hljs-attr\">label<\/span>=<span class=\"hljs-string\">\"Website\"<\/span>\n            <span class=\"hljs-attr\">variant<\/span>=<span class=\"hljs-string\">\"standard\"<\/span>\n            <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"website\"<\/span>\n          \/&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">Button<\/span> <span class=\"hljs-attr\">variant<\/span>=<span class=\"hljs-string\">\"contained\"<\/span> <span class=\"hljs-attr\">type<\/span>=<span class=\"hljs-string\">\"submit\"<\/span>&gt;<\/span>\n            Generate code\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">Button<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">Stack<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">form<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">QRCode<\/span> <span class=\"hljs-attr\">value<\/span>=<span class=\"hljs-string\">{qrValue}<\/span> <span class=\"hljs-attr\">style<\/span>=<span class=\"hljs-string\">{{<\/span> <span class=\"hljs-attr\">display:<\/span> \"<span class=\"hljs-attr\">block<\/span>\", <span class=\"hljs-attr\">margin:<\/span> \"<span class=\"hljs-attr\">0<\/span> <span class=\"hljs-attr\">auto<\/span>\" }} \/&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">Container<\/span>&gt;<\/span><\/span>\n  );\n}\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>Now let\u2019s discuss what is happening here. First, we import all of the methods and components we need. Next, we define the <code>QrGenerator<\/code> component. Inside of this component, we define a new state that will update the value users will see when they scan the QR code.<\/p>\n<p>From here, we create the <code>generateCode<\/code> function that takes the input from our business card form and updates the <code>qrValue<\/code> state variable. Next, we dive into the return statement where we render all of the elements.<\/p>\n<p>We start with the <code>&lt;form&gt;<\/code> where we call the <code>generateCode<\/code> function on submission. Then we use MUI to add the fields we need for the form. So we have inputs for a name, job title, short description, email address, and website URL with a submit button at the end. The reason these fields have been chosen is that you might want to showcase different experiences to people when you give them your QR code.<\/p>\n<p>Finally, we display the code using the <code>QRCode<\/code> component from the package we imported. This takes the state that gets updated with each form submission and displays it to people that scan the code. That\u2019s all we have to do to create this custom QR code on demand! This is great for networking at conferences when you want to say something more memorable on your cards.<\/p>\n<h2>Generate the QR code<\/h2>\n<p>Now go to the <code>App.tsx<\/code> file and delete all of the boilerplate code. Then add the following code to show the business card form:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> QrGenerator <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\".\/components\/QrGenerator\"<\/span>;\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">App<\/span>(<span class=\"hljs-params\"><\/span>) <\/span>{\n  <span class=\"hljs-keyword\">return<\/span> <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">QrGenerator<\/span> \/&gt;<\/span><\/span>;\n}\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>This is how we display our custom component when the app starts up. You can add more formatting to the value that gets displayed or just redirect them to a URL. The main thing is that you can change the QR code value on the fly, giving you some nice flexibility in how you present your business cards to different people.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/mediadevs\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/v1655907838\/e-603fc55d218a650069f5228b\/itjgdffjghwxplj63q5t.png\" alt=\"the form and QR code\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"2000\" height=\"1337\"\/><\/p>\n<h2>Finished code<\/h2>\n<p>You can check out all of the code in the <code>qr-card<\/code> folder of <a href=\"https:\/\/github.com\/flippedcoder\/media-projects\/tree\/main\/qr-card\">this repo<\/a>. You can also check out the app in <a href=\"https:\/\/codesandbox.io\/s\/youthful-nightingale-9cj5i9\">this Code Sandbox<\/a>.<\/p>\n<p>&lt;CodeSandBox\ntitle=\u201cyouthful-nightingale-9cj5i9\u201d\nid=\u201cyouthful-nightingale-9cj5i9\u201d\n\/&gt;<\/p>\n<h2>Conclusion<\/h2>\n<p>Anything that you used to print off can probably be transformed into a QR code. One thing to keep in mind is that some things do need to be printed off to give the full effect. Sometimes opening a hand-written thank you card is better than receiving a custom animated thank you through a QR code. For many things though, people will likely appreciate not needing to carry more paper or touch more things.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":41,"featured_media":27786,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[134,246,371],"class_list":["post-27785","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-guest-post","tag-react","tag-under-review"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.6 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Create a Business Card QR Code in React<\/title>\n<meta name=\"description\" content=\"Being able to create custom business cards on demand is something nice to have. You can update the information people walk away with so that they know exactly what the conversation was about. That&#039;s why we&#039;re going to generate custom business card QR codes so that we can do all of this in real-time and impress everyone with our tech skills.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create a Business Card QR Code in React\" \/>\n<meta property=\"og:description\" content=\"Being able to create custom business cards on demand is something nice to have. You can update the information people walk away with so that they know exactly what the conversation was about. That&#039;s why we&#039;re going to generate custom business card QR codes so that we can do all of this in real-time and impress everyone with our tech skills.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-06-22T14:45:51+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926284\/Web_Assets\/blog\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5.jpg?_i=AA\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Create a Business Card QR Code in React\",\"datePublished\":\"2022-06-22T14:45:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/\"},\"wordCount\":8,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926284\/Web_Assets\/blog\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5.jpg?_i=AA\",\"keywords\":[\"Guest Post\",\"React\",\"Under Review\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2022\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/\",\"url\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/\",\"name\":\"Create a Business Card QR Code in React\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926284\/Web_Assets\/blog\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5.jpg?_i=AA\",\"datePublished\":\"2022-06-22T14:45:51+00:00\",\"description\":\"Being able to create custom business cards on demand is something nice to have. You can update the information people walk away with so that they know exactly what the conversation was about. That's why we're going to generate custom business card QR codes so that we can do all of this in real-time and impress everyone with our tech skills.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926284\/Web_Assets\/blog\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5.jpg?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926284\/Web_Assets\/blog\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5.jpg?_i=AA\",\"width\":4000,\"height\":6000},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a Business Card QR Code in React\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"name\":\"Cloudinary Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudinary.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\",\"name\":\"Cloudinary Blog\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"width\":312,\"height\":60,\"caption\":\"Cloudinary Blog\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Create a Business Card QR Code in React","description":"Being able to create custom business cards on demand is something nice to have. You can update the information people walk away with so that they know exactly what the conversation was about. That's why we're going to generate custom business card QR codes so that we can do all of this in real-time and impress everyone with our tech skills.","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:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/","og_locale":"en_US","og_type":"article","og_title":"Create a Business Card QR Code in React","og_description":"Being able to create custom business cards on demand is something nice to have. You can update the information people walk away with so that they know exactly what the conversation was about. That's why we're going to generate custom business card QR codes so that we can do all of this in real-time and impress everyone with our tech skills.","og_url":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/","og_site_name":"Cloudinary Blog","article_published_time":"2022-06-22T14:45:51+00:00","twitter_card":"summary_large_image","twitter_image":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926284\/Web_Assets\/blog\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5.jpg?_i=AA","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/"},"author":{"name":"","@id":""},"headline":"Create a Business Card QR Code in React","datePublished":"2022-06-22T14:45:51+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/"},"wordCount":8,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926284\/Web_Assets\/blog\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5.jpg?_i=AA","keywords":["Guest Post","React","Under Review"],"inLanguage":"en-US","copyrightYear":"2022","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/","url":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/","name":"Create a Business Card QR Code in React","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926284\/Web_Assets\/blog\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5.jpg?_i=AA","datePublished":"2022-06-22T14:45:51+00:00","description":"Being able to create custom business cards on demand is something nice to have. You can update the information people walk away with so that they know exactly what the conversation was about. That's why we're going to generate custom business card QR codes so that we can do all of this in real-time and impress everyone with our tech skills.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926284\/Web_Assets\/blog\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5.jpg?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926284\/Web_Assets\/blog\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5.jpg?_i=AA","width":4000,"height":6000},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-business-card-qr-code-in-react\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create a Business Card QR Code in React"}]},{"@type":"WebSite","@id":"https:\/\/cloudinary.com\/blog\/#website","url":"https:\/\/cloudinary.com\/blog\/","name":"Cloudinary Blog","description":"","publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudinary.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudinary.com\/blog\/#organization","name":"Cloudinary Blog","url":"https:\/\/cloudinary.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","width":312,"height":60,"caption":"Cloudinary Blog"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":""}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926284\/Web_Assets\/blog\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5\/b5407113b8e8a434ebd359deee9081d85be70bfa-4000x6000-1_277868d1d5.jpg?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=27785"}],"version-history":[{"count":0,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27785\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/27786"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=27785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=27785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=27785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}