<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using the New Component Structure with React in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-the-new-component-structure-with-react/m-p/1604685#M86889</link>
    <description>&lt;P&gt;One thing to check, based on your screenshot, it looks like the fullscreen component is outside the arcgis-map component, but not based on your snippet. Make sure you are not using self-closing tags "&amp;lt;arcgis-fullscreen /&amp;gt;", this is not valid for Custom Elements and cause issues like this. Also if you're component is outside the arcgis-map component, there is a reference-element attribute you can use to refer to the id or tag name of the arcgis-map component.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Apr 2025 14:17:39 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2025-04-10T14:17:39Z</dc:date>
    <item>
      <title>Using the New Component Structure with React</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-the-new-component-structure-with-react/m-p/1604463#M86869</link>
      <description>&lt;P&gt;Help!&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-fullscreen/" target="_self"&gt;&amp;lt;arcgis-fullscreen&amp;gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Web Component Not Working in React&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hey Esri Community!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I'm trying to migrate from the deprecated&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Fullscreen.html" target="_self"&gt;Fullscreen&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;widget to the new&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-fullscreen/" target="_self"&gt;&amp;lt;arcgis-fullscreen&amp;gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;web component in my React app (using SDK 4.32+), but hitting a wall. The button shows up but stays disabled - no errors, just doesn't respond to clicks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;What Fails in React:&lt;/H3&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;return&lt;/SPAN&gt; &lt;SPAN class=""&gt;(&lt;/SPAN&gt;
  &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;div &lt;SPAN class=""&gt;className&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;w-full h-full relative&lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;ref&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt;containerRef&lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;arcgis-map 
      &lt;SPAN class=""&gt;className&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;w-full h-full&lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt; 
      &lt;SPAN class=""&gt;ref&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt;mapDiv&lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
      &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;arcgis-fullscreen 
        &lt;SPAN class=""&gt;position&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;bottom-right&lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;
      &lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;lt;/&lt;/SPAN&gt;arcgis-fullscreen&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;lt;/&lt;/SPAN&gt;arcgis-map&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
  &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;lt;/&lt;/SPAN&gt;div&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;As you can see in the picture, the button is outside the element and is disabled.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EmrahAydemir_0-1744242371900.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/129861i35D7ADBD06487F58/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EmrahAydemir_0-1744242371900.png" alt="EmrahAydemir_0-1744242371900.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Symptoms:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Button appears but looks disabled (grayed out)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;No console errors&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;No view property warnings&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How are React devs supposed to connect the view to web components? The docs show vanilla JS examples but React's rendering lifecycle seems to break the expected flow.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Anyone successfully implemented this in React? Is there a secret sauce to wiring up web components with the view instance? Appreciate any tips!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 23:50:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-the-new-component-structure-with-react/m-p/1604463#M86869</guid>
      <dc:creator>EmrahAydemir</dc:creator>
      <dc:date>2025-04-09T23:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using the New Component Structure with React</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-the-new-component-structure-with-react/m-p/1604562#M86871</link>
      <description>&lt;P&gt;I don't encounter the issues you are seeing, i wonder if there is some kind of lifecycle rendering issue happening? Are you using React 19 and have everything imported?&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a React implementation I have a pretty customised setup! I have an example here if it is useful to you:&amp;nbsp;&lt;A href="https://github.com/antarctica/embedded-maps/blob/main/src/components/Map/Map.tsx" target="_blank" rel="noopener"&gt;https://github.com/antarctica/embedded-maps/blob/main/src/components/Map/Map.tsx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You will notice I have replaced arcgis-map with a component which wraps it and add some logic to do with setting up a internal (and external context).&amp;nbsp;&lt;A href="https://github.com/antarctica/embedded-maps/blob/main/src/lib/arcgis/components/ArcView/ArcMapView.tsx" target="_blank" rel="noopener"&gt;https://github.com/antarctica/embedded-maps/blob/main/src/lib/arcgis/components/ArcView/ArcMapView.tsx&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 08:59:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-the-new-component-structure-with-react/m-p/1604562#M86871</guid>
      <dc:creator>JonathanDawe_BAS</dc:creator>
      <dc:date>2025-04-10T08:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using the New Component Structure with React</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-the-new-component-structure-with-react/m-p/1604684#M86888</link>
      <description>&lt;P&gt;Like&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/833978"&gt;@JonathanDawe_BAS&lt;/a&gt;&amp;nbsp;I'm not seeing this behavior either. I modified our &lt;A href="https://github.com/Esri/jsapi-resources/tree/main/component-samples/map-components/samples/react" target="_blank" rel="noopener"&gt;React sample&lt;/A&gt; to use fullscreen and no issues.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import "@arcgis/map-components/components/arcgis-map";
import "@arcgis/map-components/components/arcgis-fullscreen";

export default function App() {
  return (
    &amp;lt;arcgis-map
      itemId="d5dda743788a4b0688fe48f43ae7beb9"
      onarcgisViewReadyChange={(event) =&amp;gt; {
        console.log("MapView ready", event);
      }}
    &amp;gt;
      &amp;lt;arcgis-fullscreen position="top-right"&amp;gt;&amp;lt;/arcgis-fullscreen&amp;gt;
    &amp;lt;/arcgis-map&amp;gt;
  );
}&lt;/LI-CODE&gt;&lt;P&gt;If you have a github repo, might be able to take a look.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 14:14:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-the-new-component-structure-with-react/m-p/1604684#M86888</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2025-04-10T14:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using the New Component Structure with React</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-the-new-component-structure-with-react/m-p/1604685#M86889</link>
      <description>&lt;P&gt;One thing to check, based on your screenshot, it looks like the fullscreen component is outside the arcgis-map component, but not based on your snippet. Make sure you are not using self-closing tags "&amp;lt;arcgis-fullscreen /&amp;gt;", this is not valid for Custom Elements and cause issues like this. Also if you're component is outside the arcgis-map component, there is a reference-element attribute you can use to refer to the id or tag name of the arcgis-map component.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 14:17:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-the-new-component-structure-with-react/m-p/1604685#M86889</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2025-04-10T14:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using the New Component Structure with React</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-the-new-component-structure-with-react/m-p/1605466#M86912</link>
      <description>&lt;P&gt;Thank you so much for your help, &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/833978"&gt;@JonathanDawe_BAS&lt;/a&gt;&amp;nbsp;&amp;amp; &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;. I apologize for the late reply due to my other work commitments. After long hours of coding, I sometimes miss simple details. I had used 3dScene and forgot to add&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import "@arcgis/map-components/components/arcgis-scene";&lt;/LI-CODE&gt;&lt;P&gt;Once I included it, everything worked fine, and it’s now running smoothly. Your answers inspired the solution. Thank you very much!&amp;nbsp;I'm familiar with the old component structure of ArcGIS, but Map Components are a different experience for me...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Just a note: In my initial example where I used&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;arcgis-map&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;, I’d also overlooked adding the&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; import "@arcgis/map-components/components/arcgis-map";&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 13 Apr 2025 09:09:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-the-new-component-structure-with-react/m-p/1605466#M86912</guid>
      <dc:creator>EmrahAydemir</dc:creator>
      <dc:date>2025-04-13T09:09:19Z</dc:date>
    </item>
  </channel>
</rss>

