{"id":3424,"date":"2023-12-01T00:30:00","date_gmt":"2023-12-01T00:30:00","guid":{"rendered":"https:\/\/www.qedge.co\/blog\/?p=3424"},"modified":"2024-01-04T06:51:35","modified_gmt":"2024-01-04T06:51:35","slug":"full-stack-xm-cloud-development-guide","status":"publish","type":"post","link":"https:\/\/www.qedge.ai\/blog\/full-stack-xm-cloud-development-guide.html","title":{"rendered":"Sitecore Full-stack XM Cloud Development Guide Tutorial - Component creation"},"content":{"rendered":"\n<p>This is the last tutorial of the Full-stack XM Cloud Development Guide.<\/p>\n\n\n\n<p>So we've covered 2 parts: <a href=\"https:\/\/www.qedge.co\/blog\/how-to-set-up-docker-for-xm-cloud-dev.html\" target=\"_blank\" rel=\"noreferrer noopener\"> How to Set Up Docker for XM Cloud Dev<\/a> and <a href=\"https:\/\/www.qedge.co\/blog\/full-stack-local-xm-cloud-dev-environment.html\" target=\"_blank\" rel=\"noreferrer noopener\">Full-Stack Local XM Cloud Dev Environment Tutorial<\/a>.<\/p>\n\n\n\n<p>This  Full-stack XM Cloud Development Guide is written by Yaochang Liu, a <a href=\"https:\/\/www.qedge.co\/blog\/sitecore-content-hub-administrator-certification.html\" target=\"_blank\" rel=\"noopener\">Sitecore Content Hub Administrator Certification<\/a> winner and experienced developer from Qedge. Yaochang, we really appreciate your effort!<\/p>\n\n\n\n<p>So, let's get started.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Component Development Process<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udcd8Basic Process<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Datasource-Template\">1. Create a Datasource Template<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code> \/sitecore\/templates\/Project\/Components\/Demo\/Demo1Component<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1905\" height=\"830\" src=\"https:\/\/www.qedge.co\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247.png\" alt=\"Full-stack XM Cloud Development Guide\" class=\"wp-image-3436\" srcset=\"https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247.png 1905w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-768x335.png 768w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-1536x669.png 1536w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-720x314.png 720w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-580x253.png 580w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-320x139.png 320w\" sizes=\"auto, (max-width: 1905px) 100vw, 1905px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Parameters-Template\">2. Create a Parameters Template<\/h4>\n\n\n\n<p> Create a Parameters Template and build Standard Values<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/sitecore\/templates\/Project\/Components\/Demo\/Rendering Parameters\/Demo1 Parameters<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1904\" height=\"750\" src=\"https:\/\/www.qedge.co\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-14.png\" alt=\"Create a Parameters Template\" class=\"wp-image-3473\" srcset=\"https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-14.png 1904w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-14-768x303.png 768w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-14-1536x605.png 1536w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-14-720x284.png 720w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-14-580x228.png 580w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-14-320x126.png 320w\" sizes=\"auto, (max-width: 1904px) 100vw, 1904px\" \/><figcaption class=\"wp-element-caption\">Note:  Select at least 3 Base templates shown above, and additional ones can be added based on requirements.<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Create-a-JSON-rendering\">3. Create a JSON rendering<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\/sitecore\/layout\/Renderings\/Project\/Play\/Demo Component\/Demo1<\/code><\/pre>\n\n\n\n<p>Edit the following fields:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Parameters Template: Select the <a href=\"#Parameters-Template\" data-type=\"internal\" data-id=\"#Parameters-Template\">Parameters Template created in step 2<\/a>.<\/li>\n\n\n\n<li>Datasource Template: Select the <a href=\"#Datasource-Template\" data-type=\"internal\" data-id=\"#Datasource-Template\">Datasource Template created in step 1<\/a>.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1081\" height=\"906\" src=\"https:\/\/www.qedge.co\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-2.png\" alt=\"Create a JSON rendering\" class=\"wp-image-3442\" srcset=\"https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-2.png 1081w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-2-768x644.png 768w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-2-720x603.png 720w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-2-580x486.png 580w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-2-320x268.png 320w\" sizes=\"auto, (max-width: 1081px) 100vw, 1081px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">4. Create Available Rendering<\/h4>\n\n\n\n<p>Add the JSON Rendering created in Step 3 to the corresponding <strong>Available Rendering<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> \/sitecore\/content\/Play\/Play\/Presentation\/Available Renderings\/Demo Component<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1778\" height=\"656\" src=\"https:\/\/www.qedge.co\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-3.png\" alt=\"Create Available Rendering\" class=\"wp-image-3443\" srcset=\"https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-3.png 1778w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-3-768x283.png 768w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-3-1536x567.png 1536w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-3-720x266.png 720w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-3-580x214.png 580w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-3-320x118.png 320w\" sizes=\"auto, (max-width: 1778px) 100vw, 1778px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">5. Create Variants<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code> \/sitecore\/content\/Play\/Play\/Presentation\/Headless Variants\/Demo1<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Create-Variant-Definition\">6. Create Variant Definition<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\/sitecore\/content\/Play\/Play\/Presentation\/Headless Variants\/Demo1\/Default<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1728\" height=\"684\" src=\"https:\/\/www.qedge.co\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-4.png\" alt=\"Create Variant Definition\" class=\"wp-image-3444\" srcset=\"https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-4.png 1728w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-4-768x304.png 768w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-4-1536x608.png 1536w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-4-720x285.png 720w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-4-580x230.png 580w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-4-320x127.png 320w\" sizes=\"auto, (max-width: 1728px) 100vw, 1728px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">7. FE coding<\/h4>\n\n\n\n<p>The file name should be consistent with the <strong>Component Name<\/strong> in <a href=\"#Create-a-JSON-rendering\" data-type=\"internal\" data-id=\"#Create-a-JSON-rendering\">step 3 of the JSON rendering<\/a> and should not contain any spaces.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1363\" height=\"773\" src=\"https:\/\/www.qedge.co\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-5.png\" alt=\"FE coding\" class=\"wp-image-3445\" srcset=\"https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-5.png 1363w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-5-768x436.png 768w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-5-720x408.png 720w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-5-580x329.png 580w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-5-320x181.png 320w\" sizes=\"auto, (max-width: 1363px) 100vw, 1363px\" \/><\/figure>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"467\" height=\"730\" src=\"https:\/\/www.qedge.co\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-6.png\" alt=\"FE coding -  tsx\" class=\"wp-image-3446\" srcset=\"https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-6.png 467w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-6-320x500.png 320w\" sizes=\"auto, (max-width: 467px) 100vw, 467px\" \/><\/figure>\n<\/div>\n\n\n<pre class=\"wp-block-code\"><code>import React from 'react';\nimport {\n    Image as JssImage,\n    Text,\n    ImageField,\n    TextField,\n} from '@sitecore-jss\/sitecore-jss-nextjs';\n\ninterface Fields {\n    Image: ImageField;\n    Title: TextField;\n}\n\ntype Demo1Props = {\n  params: { &#91;key: string]: string };\n  fields: Fields;\n};\n\nconst Demo1DefaultComponent = (props: Demo1Props): JSX.Element =&gt; (\n    &lt;div className={`component promo ${props.params.styles}`}&gt;\n        &lt;div className=\"component-content\"&gt;\n            &lt;span className=\"is-empty-hint\"&gt;Demo1&lt;\/span&gt;\n        &lt;\/div&gt;\n    &lt;\/div&gt;\n);\n\nexport const Default = (props: Demo1Props): JSX.Element =&gt; {\n    const id = props.params.RenderingIdentifier;\n    if (props.fields) {\n        return (\n            &lt;div className={`component promo ${props.params.styles}`} id={id ? id : undefined}&gt;\n                &lt;div className=\"component-content\"&gt;\n                    &lt;div className=\"field-promoicon\"&gt;\n                        &lt;JssImage field={props.fields.Image} \/&gt;\n                    &lt;\/div&gt;\n                    &lt;div className=\"promo-text\"&gt;\n                        &lt;div&gt;\n                            &lt;div className=\"field-promotext\"&gt;\n                                &lt;Text field={props.fields.Title} \/&gt;\n\n                            &lt;\/div&gt;\n                        &lt;\/div&gt;\n\n                    &lt;\/div&gt;\n                &lt;\/div&gt;\n            &lt;\/div&gt;\n        );\n    }\n\n    return &lt;Demo1DefaultComponent {...props} \/&gt;;\n};\n\n<\/code><\/pre>\n\n\n\n<p>Note: Ensure that the<strong> export const Default <\/strong>is consistent with the name \"Default\" in <a href=\"#Create-Variant-Definition\" data-type=\"internal\" data-id=\"#Create-Variant-Definition\">step 6 of the Variant Definition<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2708\ufe0fAdvanced Techniques<\/h3>\n\n\n\n<p>Nest <strong>Components<\/strong> within <strong>Components (static placeholder)<\/strong> and\/or using <strong>multi-variant<\/strong>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1. Create a Placeholder<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\/sitecore\/layout\/Placeholder Settings\/Project\/Play\/Demo1<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1422\" height=\"727\" src=\"https:\/\/www.qedge.co\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-7.png\" alt=\"Create a Placeholder\" class=\"wp-image-3449\" srcset=\"https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-7.png 1422w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-7-768x393.png 768w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-7-720x368.png 720w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-7-580x297.png 580w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-7-320x164.png 320w\" sizes=\"auto, (max-width: 1422px) 100vw, 1422px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">2. Update Rendering<\/h4>\n\n\n\n<p>Modify the <strong>Layout Service Placeholders<\/strong> in the JSON Rendering. <\/p>\n\n\n\n<p>Select the Placeholder added in the previous step.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1405\" height=\"890\" src=\"https:\/\/www.qedge.co\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-8.png\" alt=\"Update Rendering\" class=\"wp-image-3450\" srcset=\"https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-8.png 1405w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-8-768x486.png 768w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-8-720x456.png 720w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-8-580x367.png 580w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-8-320x203.png 320w\" sizes=\"auto, (max-width: 1405px) 100vw, 1405px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">3. Set placeholder restrictions<\/h4>\n\n\n\n<p>Add placeholder to the appropriate path<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> \/sitecore\/content\/Play\/Play\/Presentation\/Placeholder Settings\/Demo1\/Demo1<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1819\" height=\"814\" src=\"https:\/\/www.qedge.co\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-9.png\" alt=\"Set placeholder restrictions\" class=\"wp-image-3452\" srcset=\"https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-9.png 1819w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-9-768x344.png 768w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-9-1536x687.png 1536w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-9-720x322.png 720w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-9-580x260.png 580w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-9-320x143.png 320w\" sizes=\"auto, (max-width: 1819px) 100vw, 1819px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">4. Add a Variant Definition<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\/sitecore\/content\/Play\/Play\/Presentation\/Headless Variants\/Demo1\/WithSub<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1655\" height=\"654\" src=\"https:\/\/www.qedge.co\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-10.png\" alt=\"Add a Variant Definition\" class=\"wp-image-3453\" srcset=\"https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-10.png 1655w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-10-768x303.png 768w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-10-1536x607.png 1536w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-10-720x285.png 720w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-10-580x229.png 580w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-10-320x126.png 320w\" sizes=\"auto, (max-width: 1655px) 100vw, 1655px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">5. FE coding<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>import React from 'react';\nimport {\n    Image as JssImage,\n    Text,\n    ImageField,\n    TextField,\n    Placeholder,\n} from '@sitecore-jss\/sitecore-jss-nextjs';\nimport { ComponentProps } from 'lib\/component-props';\n\ninterface Fields {\n    Image: ImageField;\n    Title: TextField;\n}\n\ntype Demo1Props =\n    ComponentProps &amp; {\n        fields: Fields;\n    };\n\nconst Demo1DefaultComponent = (props: Demo1Props): JSX.Element =&gt; (\n    &lt;div className={`component promo ${props.params.styles}`}&gt;\n        &lt;div className=\"component-content\"&gt;\n            &lt;span className=\"is-empty-hint\"&gt;Demo1&lt;\/span&gt;\n        &lt;\/div&gt;\n    &lt;\/div&gt;\n);\n\nexport const Default = (props: Demo1Props): JSX.Element =&gt; {\n    const id = props.params.RenderingIdentifier;\n    if (props.fields) {\n        return (\n            &lt;div className={`component promo ${props.params.styles}`} id={id ? id : undefined}&gt;\n                &lt;div className=\"component-content\"&gt;\n                    &lt;div className=\"field-promoicon\"&gt;\n                        &lt;JssImage field={props.fields.Image} \/&gt;\n                    &lt;\/div&gt;\n                    &lt;div className=\"promo-text\"&gt;\n                        &lt;div&gt;\n                            &lt;div className=\"field-promotext\"&gt;\n                                &lt;Text field={props.fields.Title} \/&gt;\n\n                            &lt;\/div&gt;\n                        &lt;\/div&gt;\n\n                    &lt;\/div&gt;\n                &lt;\/div&gt;\n            &lt;\/div&gt;\n        );\n    }\n\n    return &lt;Demo1DefaultComponent {...props} \/&gt;;\n};\n\n<strong>export const WithSub = (props: Demo1Props): JSX.Element =&gt; {\n    const id = props.params.RenderingIdentifier;\n    if (props.fields) {\n        return (\n            &lt;div className={`component promo ${props.params.styles}`} id={id ? id : undefined}&gt;\n                &lt;div className=\"component-content\"&gt;\n                    &lt;div className=\"field-promoicon\"&gt;\n                        &lt;JssImage field={props.fields.Image} \/&gt;\n                    &lt;\/div&gt;\n                    &lt;div className=\"promo-text\"&gt;\n                        &lt;div&gt;\n                            &lt;div className=\"field-promotext\"&gt;\n                                &lt;Text field={props.fields.Title} \/&gt;\n                                &lt;h1&gt;VVV&lt;\/h1&gt;\n                                &lt;div className=\"row\"&gt;<\/strong>\n                                     \/\/The following is for nesting components<strong>\n                                    &lt;Placeholder name=\"demo1\" rendering={props.rendering} \/&gt;\n                                &lt;\/div&gt;\n                            &lt;\/div&gt;\n                        &lt;\/div&gt;\n\n                    &lt;\/div&gt;\n                &lt;\/div&gt;\n            &lt;\/div&gt;\n        );\n    }\n\n    return &lt;Demo1DefaultComponent {...props} \/&gt;;\n};<\/strong>\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udcdd Styles<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1. Add Styles<\/h4>\n\n\n\n<p>Add the JSON Rendering to the Allowed Renderings of the corresponding Style<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/sitecore\/content\/Play\/Play\/Presentation\/Styles\/Demo1\/Demo1 large<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1528\" height=\"876\" src=\"https:\/\/www.qedge.co\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-11.png\" alt=\"Add Styles\" class=\"wp-image-3460\" srcset=\"https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-11.png 1528w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-11-768x440.png 768w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-11-720x413.png 720w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-11-580x333.png 580w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-11-320x183.png 320w\" sizes=\"auto, (max-width: 1528px) 100vw, 1528px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">2. FE coding<\/h4>\n\n\n\n<p>Add scss<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"490\" height=\"578\" src=\"https:\/\/www.qedge.co\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-12.png\" alt=\"Add scss\" class=\"wp-image-3462\" srcset=\"https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-12.png 490w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-12-320x377.png 320w\" sizes=\"auto, (max-width: 490px) 100vw, 490px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>@import \"@sass\/abstracts\/vars\";\n@import \"@sass\/abstracts\/mixins\";\n\n.large-css {\n    max-width: 960px;\n    padding: 0;\n    border-top-width: 3px;\n    border-style: solid;\n    overflow: visible;\n    background-color: red;\n}\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">3. Preview in Pages <\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1907\" height=\"870\" src=\"https:\/\/www.qedge.co\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-13.png\" alt=\"Preview in Pages\" class=\"wp-image-3463\" srcset=\"https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-13.png 1907w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-13-768x350.png 768w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-13-1536x701.png 1536w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-13-720x328.png 720w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-13-580x265.png 580w, https:\/\/www.qedge.ai\/blog\/wp-content\/uploads\/2023\/10\/\u56fe\u7247-13-320x146.png 320w\" sizes=\"auto, (max-width: 1907px) 100vw, 1907px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the last tutorial of the Full-stack XM Cloud Development Guide. So we've covered 2 parts: How to Set Up Docker for XM Cloud Dev and Full-Stack Local XM Cloud Dev Environment Tutorial. This Full-stack XM Cloud Development Guide is written by Yaochang Liu, a Sitecore Content Hub Administrator Certification winner and experienced developer [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":3475,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[82],"tags":[21,35,32,23,27,80],"class_list":["post-3424","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-qedge-digital-solutions","tag-qedge-technologies-reviews","tag-sitecore-developer","tag-sitecore-development","tag-sitecore-implementation","tag-xm-cloud-dev"],"views":6719,"_links":{"self":[{"href":"https:\/\/www.qedge.ai\/blog\/wp-json\/wp\/v2\/posts\/3424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qedge.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qedge.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qedge.ai\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qedge.ai\/blog\/wp-json\/wp\/v2\/comments?post=3424"}],"version-history":[{"count":15,"href":"https:\/\/www.qedge.ai\/blog\/wp-json\/wp\/v2\/posts\/3424\/revisions"}],"predecessor-version":[{"id":4795,"href":"https:\/\/www.qedge.ai\/blog\/wp-json\/wp\/v2\/posts\/3424\/revisions\/4795"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.qedge.ai\/blog\/wp-json\/wp\/v2\/media\/3475"}],"wp:attachment":[{"href":"https:\/\/www.qedge.ai\/blog\/wp-json\/wp\/v2\/media?parent=3424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qedge.ai\/blog\/wp-json\/wp\/v2\/categories?post=3424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qedge.ai\/blog\/wp-json\/wp\/v2\/tags?post=3424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}