{"id":59495,"date":"2023-12-26T22:48:01","date_gmt":"2023-12-26T17:18:01","guid":{"rendered":"https:\/\/www.tothenew.com\/blog\/?p=59495"},"modified":"2024-06-10T15:35:06","modified_gmt":"2024-06-10T10:05:06","slug":"aem-with-nextjs-remotespa-a-comprehensive-integration-guide","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/aem-with-nextjs-remotespa-a-comprehensive-integration-guide\/","title":{"rendered":"AEM with NextJs RemoteSPA: A Comprehensive Integration Guide"},"content":{"rendered":"<p><span style=\"color: #222222;\">Welcome to our comprehensive guide, where we illuminate the process of updating a Remote Single Page Application (SPA) \u2013 operating independently of AEM \u2013 to seamlessly consume and deliver content authored within Adobe Experience Manager (AEM). Throughout this blog, our focus centers on the local setup of an AEM instance and a Next.js application, as well as the binding necessary to make them work together harmoniously. <\/span><span style=\"color: #222222; letter-spacing: 0.0px;\">We will also create a demo component and drop it on the home page, exposing you to working on Remote SPA with AEM.<\/span><\/p>\n<h2><strong style=\"letter-spacing: -0.008em;\">Steps to Setup Local AEM Instance with Nextjs App<\/strong><\/h2>\n<p><strong><span style=\"letter-spacing: 0.0px;\">Step 1: Setup Local AEM Instance<\/span><\/strong><\/p>\n<ol>\n<li><a href=\"https:\/\/experience.adobe.com\/#\/downloads\/content\/software-distribution\/en\/aemcloud.html?fulltext=AEM*+SDK*&amp;orderby=%40jcr%3Acontent%2Fjcr%3AlastModified&amp;orderby.sort=desc&amp;layout=list&amp;p.offset=0&amp;p.limit=1\">Download the latest AEM SDK<\/a><\/li>\n<li>Unzip the AEM SDK to ~\/aem-sdk<\/li>\n<li>Rename the AEM SDK Quickstart Jar file to \u201caem-author-p4502.jar\u201d<\/li>\n<li>In Terminal, run the following command<\/li>\n<\/ol>\n<pre><strong style=\"font-size: 1rem;\"><em>java -jar aem-author-p4502.jar<\/em><\/strong><\/pre>\n<p style=\"margin-left: 40.0px;\">By using the above command, the AEM Instance is created in Author mode and automatically launches on <a href=\"http:\/\/localhost:4502\/\">http:\/\/localhost:4502<\/a>. Then log in using the following credentials:<\/p>\n<p style=\"margin-left: 40.0px;\">Username: admin<br \/>\nPassword: admin<\/p>\n<p><strong>Step 2: Download &amp; Install Wknd Site Package<\/strong><\/p>\n<ol>\n<li><a href=\"https:\/\/github.com\/adobe\/aem-guides-wknd\/releases\">Download the latest version of aem-guides-wknd.all.x.x.x.zip<\/a><\/li>\n<li>Go to <a href=\"http:\/\/localhost:4502\/crx\/packmgr\">http:\/\/localhost:4502\/crx\/packmgr<\/a>.<\/li>\n<li>Upload the aem-guides-wknd.all.x.x.x.zip downloaded in step 1<\/li>\n<li>Tap the Install button for the entry aem-guides-wknd.all-x.x.x.zip. (This Step is used for content purposes only.)<\/li>\n<\/ol>\n<p><strong>Step 3: Create an AEM Project using AEM Archetype<\/strong><\/p>\n<p style=\"margin-left: 40.0px;\">Here, we are using AEM Archetype Version 41 and removing the frontend module because we don&#8217;t need the frontend module anymore as we are using RemoteSPA.<\/p>\n<p style=\"margin-left: 40.0px;\">We can change groupId, appId, and app title as required.<\/p>\n<pre style=\"margin-left: 80.0px;\"><strong><em>mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate \\<\/em><\/strong>\r\n\r\n<strong><em> -D archetypeGroupId=com.adobe.aem \\<\/em><\/strong>\r\n<strong><em> -D archetypeArtifactId=aem-project-archetype \\<\/em><\/strong>\r\n<strong><em> -D archetypeVersion=41\\<\/em><\/strong>\r\n<strong><em> -D aemVersion=cloud \\<\/em><\/strong>\r\n<strong><em> -D appTitle=\"WKND App\" \\<\/em><\/strong>\r\n<strong><em> -D appId=\"wknd-app\" \\<\/em><\/strong>\r\n<strong><em> -D groupId=\"com.adobe.aem.guides.wkndapp\" \\<\/em><\/strong>\r\n<strong><em>\u00a0-D frontendModule=\"decoupled\"<\/em><\/strong><\/pre>\n<p><strong>Step 4: Changes in Codebase<\/strong><\/p>\n<p style=\"margin-left: 40.0px;\">A few adjustments are required for AEM SPA Editor compatibility with Remote Next.js SPAs.<\/p>\n<p style=\"margin-left: 40.0px;\">Set AEM Page as Next.js Remote SPA Template: open <strong><em>ui.content\/src\/main\/content\/jcr_root\/content\/wknd-app\/us\/en\/home\/.content.xml<\/em><\/strong> and update it as below.<\/p>\n<pre style=\"margin-left: 80.0px;\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;jcr:root xmlns:sling=\"<a href=\"http:\/\/sling.apache.org\/jcr\/sling\/1.0\">http:\/\/sling.apache.org\/jcr\/sling\/1.0<\/a>\" xmlns:cq=\"<a href=\"http:\/\/www.day.com\/jcr\/cq\/1.0\">http:\/\/www.day.com\/jcr\/cq\/1.0<\/a>\" xmlns:jcr=\"<a href=\"http:\/\/www.jcp.org\/jcr\/1.0\">http:\/\/www.jcp.org\/jcr\/1.0<\/a>\" xmlns:nt=\"<a href=\"http:\/\/www.jcp.org\/jcr\/nt\/1.0\">http:\/\/www.jcp.org\/jcr\/nt\/1.0<\/a>\"\r\njcr:primaryType=\"cq:Page\"&gt;\r\n&lt;jcr:content\r\ncq:template=\"\/conf\/wknd-app\/settings\/wcm\/templates\/spa-next-remote-page\"\r\njcr:primaryType=\"cq:PageContent\"\r\njcr:title=\"WKND App Home Page\"\r\nsling:resourceType=\"wknd-app\/components\/remotepagenext\"&gt;\r\n&lt;root\r\njcr:primaryType=\"nt:unstructured\"\r\nsling:resourceType=\"wcm\/foundation\/components\/responsivegrid\"&gt;\r\n&lt;responsivegrid\r\njcr:primaryType=\"nt:unstructured\"\r\nsling:resourceType=\"wcm\/foundation\/components\/responsivegrid\"&gt;\r\n&lt;text\r\njcr:primaryType=\"nt:unstructured\"\r\nsling:resourceType=\"wknd-app\/components\/text\"\r\ntext=\"&amp;lt;p&gt;Hello World!&amp;lt;\/p&gt;\"\r\ntextIsRich=\"true\"&gt;\r\n&lt;cq:responsive jcr:primaryType=\"nt:unstructured\"\/&gt;\r\n&lt;\/text&gt;\r\n&lt;\/responsivegrid&gt;\r\n&lt;\/root&gt;\r\n&lt;\/jcr:content&gt;\r\n&lt;\/jcr:root&gt;<\/pre>\n<p style=\"margin-left: 40.0px;\">Finally, deploy the AEM Project to AEM SDK by using maven command given below<\/p>\n<pre style=\"margin-left: 80.0px;\"><strong><em>mvn clean install -PautoInstallSinglePackage<\/em><\/strong><\/pre>\n<p><strong>Step 5: Configure the root AEM Page<\/strong><\/p>\n<ol>\n<li>Log in to AEM Author<\/li>\n<li>Navigate to Sites &gt; WKND App &gt; us &gt; en<\/li>\n<li>Select the WKND App Home Page, and tap Properties<\/li>\n<li>Navigate to the SPA tab<\/li>\n<li>Fill out the Remote SPA Configuration: <a href=\"http:\/\/localhost:3000\">http:\/\/localhost:3000<\/a><\/li>\n<li>Tap Save &amp; Close<\/li>\n<\/ol>\n<p><strong>Step 6: Clone the Next.js App<\/strong><\/p>\n<p style=\"margin-left: 40.0px;\">Clone the project to your local machine by using command given below.<\/p>\n<pre style=\"margin-left: 80.0px;\">git clone <a href=\"https:\/\/github.com\/adobe\/aem-headless-app-templates\">https:\/\/github.com\/adobe\/aem-headless-app-templates<\/a>\r\n\r\nmkdir aem-nextjs-app\r\ncp -r aem-headless-app-templates\/nextjs-remotespa\/* aem-nextjs-app\/\r\ncd aem-nextjs-app\/<\/pre>\n<p><strong>Step 7: Setup Next.js App<\/strong><\/p>\n<ol>\n<li>Install node version <strong>16.x\u00a0<\/strong><\/li>\n<li>Goto location where <strong>aem-nextjs-app <\/strong>is present<\/li>\n<li>Run Command &#8211;<strong> npm install<\/strong><\/li>\n<\/ol>\n<p style=\"margin-left: 40.0px;\">Create 2 files under directory <strong>aem-nextjs-app\/<\/strong>\u00a0 named as <em><strong>\u201c<\/strong><\/em><em><strong>.env.development<\/strong><\/em><em><strong>\u201d<\/strong><\/em> and<strong> \u201c<\/strong><strong>.env.production<\/strong><strong>\u201d <\/strong>and update it as below.<\/p>\n<pre style=\"margin-left: 80.0px;\">NEXT_PUBLIC_URL=<a href=\"http:\/\/localhost:3000\">http:\/\/localhost:3000<\/a>\r\n\r\nNEXT_PUBLIC_AEM_HOST=<a href=\"http:\/\/localhost:4502\">http:\/\/localhost:4502<\/a>\r\n\r\nNEXT_GRAPHQL_ENDPOINT=\/content\/graphql\/global\/endpoint.json\r\n\r\nNEXT_PUBLIC_AEM_SITE=wknd-app\r\n\r\nNEXT_PUBLIC_AEM_PATH=\/content\/wknd-app\/us\/en\/home\r\n\r\nNEXT_PUBLIC_AEM_ROOT=\/content\/wknd-app\/us\/en<\/pre>\n<p style=\"margin-left: 40.0px;\">Then execute the build command<\/p>\n<pre style=\"margin-left: 80.0px;\"><em><strong>npm run build<\/strong><\/em><\/pre>\n<p style=\"margin-left: 40.0px;\">Then, you can start the app in development mode or in production mode by using the command given below.<\/p>\n<pre style=\"margin-left: 80.0px;\"><strong><em>npm run dev<\/em><\/strong><\/pre>\n<p style=\"margin-left: 80.0px;\">Or<\/p>\n<pre style=\"margin-left: 80.0px;\"><strong><em>npm run start <\/em><\/strong><\/pre>\n<p><strong>Step 8: Now your instance is ready for development<\/strong><\/p>\n<p style=\"margin-left: 40.0px;\">You can create a new component in AEM and React and render it on Page.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>Steps to create the component in Next.js App and bind it with AEM component<\/strong><\/h2>\n<p><strong>Step 1: Create an AEM component<\/strong><\/p>\n<p style=\"margin-left: 40.0px;\"><span style=\"letter-spacing: 0.0px;\">Create DemoComponent in ui.apps as shown below. There is no need for a DemoComponent.html file.<\/span><\/p>\n<p style=\"margin-left: 80.0px;\"><span style=\"letter-spacing: 0.0px;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-59558\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-26-32.png\" alt=\"\" width=\"270\" height=\"128\" \/><\/span><\/p>\n<p style=\"margin-left: 40.0px;\">Create a DemoComponent model in the core module as shown below.<\/p>\n<p style=\"margin-left: 80.0px;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-59559\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-30-25.png\" alt=\"\" width=\"314\" height=\"212\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-30-25.png 314w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-30-25-300x203.png 300w\" sizes=\"(max-width: 314px) 100vw, 314px\" \/><\/p>\n<p style=\"margin-left: 40.0px;\">Update file with content given in <a class=\"confluence-link unresolved\" href=\"#\" data-linked-resource-default-alias=\"DemoComponentModel.java\" data-filename=\"DemoComponentModel.java\">DemoComponentModel.java<\/a> and\u00a0<a class=\"confluence-link unresolved\" href=\"#\" data-linked-resource-default-alias=\"DemoComponentModelImpl.java\" data-filename=\"DemoComponentModelImpl.java\">DemoComponentModelImpl.java<\/a>.<\/p>\n<p style=\"margin-left: 40.0px;\">Here, Sling Exporter is used for e<span style=\"color: #222222;\">xporting Sling Models as JSON objects for consumption by programmatic web consumers such as other web services and JavaScript applications.<\/span><\/p>\n<p style=\"margin-left: 80.0px;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-59560\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-17-07-18-1024x630.png\" alt=\"\" width=\"625\" height=\"385\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-17-07-18-1024x630.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-17-07-18-300x185.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-17-07-18-768x472.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-17-07-18-624x384.png 624w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-17-07-18.png 1039w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/p>\n<p><strong style=\"letter-spacing: 0.0px;\">Step 2: Create a component in NextJs App<\/strong><\/p>\n<p style=\"margin-left: 40.0px;\">Create a file under directory\u00a0 &#8211; aem-nextjs-app\/components\/\u00a0 \u00a0 named as AEMDemoComponent.jsx (Download <a class=\"confluence-link unresolved\" href=\"#\" data-linked-resource-default-alias=\"AEMDemoComponent.jsx\" data-filename=\"AEMDemoComponent.jsx\">AEMDemoComponent.jsx<\/a> file).<\/p>\n<p style=\"margin-left: 80.0px;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-59561\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-23-38.png\" alt=\"\" width=\"236\" height=\"271\" \/><\/p>\n<p style=\"margin-left: 40.0px;\">And\u00a0 update the file as below &#8211;<\/p>\n<p style=\"margin-left: 40.0px;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-59562\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-21-50-1024x601.png\" alt=\"\" width=\"625\" height=\"367\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-21-50-1024x601.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-21-50-300x176.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-21-50-768x451.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-21-50-624x366.png 624w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-21-50.png 1102w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/p>\n<p><strong>Step 3: Create Mapping with AEM Component<\/strong><\/p>\n<p style=\"margin-left: 40.0px;\">Open import-components.js file and update it as below.<\/p>\n<pre style=\"margin-left: 80.0px;\"><strong><em>MapTo(`${NEXT_PUBLIC_AEM_SITE}\/components\/democomponent`)(AEMDemoComponent)<\/em><\/strong><\/pre>\n<p style=\"margin-left: 80.0px;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-59563\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-37-45.png\" alt=\"\" width=\"253\" height=\"254\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-37-45.png 253w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-37-45-150x150.png 150w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-37-45-120x120.png 120w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-37-45-24x24.png 24w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-37-45-48x48.png 48w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-37-45-96x96.png 96w\" sizes=\"(max-width: 253px) 100vw, 253px\" \/><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-59565\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-40-24.png\" alt=\"\" width=\"715\" height=\"255\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-40-24.png 715w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-40-24-300x107.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-14-40-24-624x223.png 624w\" sizes=\"(max-width: 715px) 100vw, 715px\" \/><\/p>\n<p><strong>Step 4: Drop the Demo Component on the Home Page<\/strong><\/p>\n<ol>\n<li>Go to <a href=\"http:\/\/localhost:4502\/editor.html\/content\/wknd-app\/us\/en\/home.html\">http:\/\/localhost:4502\/editor.html\/content\/wknd-app\/us\/en\/home.html<\/a><\/li>\n<\/ol>\n<p style=\"margin-left: 80.0px;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-59566\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-47-48-1024x484.png\" alt=\"\" width=\"625\" height=\"295\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-47-48-1024x484.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-47-48-300x142.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-47-48-768x363.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-47-48-624x295.png 624w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-47-48.png 1283w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/p>\n<p style=\"margin-left: 40.0px;\">2. Drop Component here<\/p>\n<p style=\"margin-left: 80.0px;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-59567\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-48-13-1024x488.png\" alt=\"\" width=\"625\" height=\"298\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-48-13-1024x488.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-48-13-300x143.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-48-13-768x366.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-48-13-624x297.png 624w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-48-13.png 1283w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/p>\n<p style=\"margin-left: 80.0px;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-59568\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-48-53-1024x488.png\" alt=\"\" width=\"625\" height=\"298\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-48-53-1024x488.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-48-53-300x143.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-48-53-768x366.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-48-53-624x297.png 624w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-48-53.png 1283w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/p>\n<p style=\"margin-left: 40.0px;\">3. Now, open the home page in view as a published mode &#8211; \u00a0<a href=\"http:\/\/localhost:4502\/content\/wknd-app\/us\/en\/home.html\">http:\/\/localhost:4502\/content\/wknd-app\/us\/en\/home.html<\/a> , then inspect the page and check network calls<\/p>\n<p style=\"margin-left: 80.0px;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-59569\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-09-11-30-34-1024x380.png\" alt=\"\" width=\"625\" height=\"232\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-09-11-30-34-1024x380.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-09-11-30-34-300x111.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-09-11-30-34-768x285.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-09-11-30-34-624x231.png 624w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-09-11-30-34.png 1294w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/p>\n<p style=\"margin-left: 40.0px;\">4. Now check the component on the NextJs App:\u00a0 <a href=\"http:\/\/localhost:3000\/\">http:\/\/localhost:3000\/<\/a><\/p>\n<p style=\"margin-left: 80.0px;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-59570\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-49-28-1024x212.png\" alt=\"\" width=\"625\" height=\"129\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-49-28-1024x212.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-49-28-300x62.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-49-28-768x159.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-49-28-624x129.png 624w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-07-16-49-28.png 1287w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/p>\n<p style=\"margin-left: 40.0px;\">5. Inspect the page open the network tab check _app.js call, then search for democomponent.<\/p>\n<p style=\"margin-left: 80.0px;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-59572\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-09-11-28-30-1024x387.png\" alt=\"\" width=\"625\" height=\"236\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-09-11-28-30-1024x387.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-09-11-28-30-300x113.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-09-11-28-30-768x290.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-09-11-28-30-624x236.png 624w, \/blog\/wp-ttn-blog\/uploads\/2023\/12\/Screenshot-from-2023-10-09-11-28-30.png 1282w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/p>\n<div class=\"ap-custom-wrapper\"><\/div><!--ap-custom-wrapper-->","protected":false},"excerpt":{"rendered":"<p>Welcome to our comprehensive guide, where we illuminate the process of updating a Remote Single Page Application (SPA) \u2013 operating independently of AEM \u2013 to seamlessly consume and deliver content authored within Adobe Experience Manager (AEM). Throughout this blog, our focus centers on the local setup of an AEM instance and a Next.js application, as [&hellip;]<\/p>\n","protected":false},"author":1697,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":1243},"categories":[5868],"tags":[4847,5285,5595,5596,2046],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/59495"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/1697"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=59495"}],"version-history":[{"count":5,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/59495\/revisions"}],"predecessor-version":[{"id":59631,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/59495\/revisions\/59631"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=59495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=59495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=59495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}