<?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 Calcite Components and ArcGIS Maps SDK for JavaScript with React and redux in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-calcite-components-and-arcgis-maps-sdk-for/m-p/1286590#M81075</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/471565"&gt;@MichelleStuart&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;When your saying 'View' are you referring to the mapView / webView or an actual React component that's rendering as a view?&lt;BR /&gt;&lt;BR /&gt;We've built a large web application in React using redux, and we store a reference to the mapView / webView in redux after we &lt;SPAN&gt;instantiate&amp;nbsp;&lt;/SPAN&gt;it and call on that if we need to use any operations from it.&lt;BR /&gt;&lt;BR /&gt;e.g: Image we have a completely different React component that renders that has a button or such that needs to move the map.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;moveMap = (target =&amp;gt; { // A function inside a react component that's triggered by a button's onClick event

const { mapView } = this.props // reference we've injected into this functional component from redux.

mapView.goto(target)
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Is there any further information you can provide to clarify the issue?&lt;/P&gt;</description>
    <pubDate>Mon, 08 May 2023 03:03:24 GMT</pubDate>
    <dc:creator>JamesIng</dc:creator>
    <dc:date>2023-05-08T03:03:24Z</dc:date>
    <item>
      <title>Using Calcite Components and ArcGIS Maps SDK for JavaScript with React and redux</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-calcite-components-and-arcgis-maps-sdk-for/m-p/1285254#M81026</link>
      <description>&lt;P&gt;We are building a complex web application and love the component aspect of React to keep chunks of code manageable.&amp;nbsp; We use redux to prevent prop-drilling and currently the view is in the state.&amp;nbsp; At the DevSummit, I was told I should remove the view from the state because the view maintains its own state, and this makes sense, but I can't figure out how to have the view available to the various components throughout the app without prop drilling. For example if I create the view in the top level, and there is a Calcite Shell child, I have to pass the view down to the Shell, then inside the Shell is a Calcite Panel holding the basemap gallery, and the Basemap gallery requires a view, so I have to pass the view down the line to that component.&lt;/P&gt;&lt;P&gt;Are those my only 2 choices?&amp;nbsp; To prop-drill or to hold the view in redux state?&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 16:24:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-calcite-components-and-arcgis-maps-sdk-for/m-p/1285254#M81026</guid>
      <dc:creator>MichelleStuart</dc:creator>
      <dc:date>2023-05-03T16:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using Calcite Components and ArcGIS Maps SDK for JavaScript with React and redux</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-calcite-components-and-arcgis-maps-sdk-for/m-p/1286590#M81075</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/471565"&gt;@MichelleStuart&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;When your saying 'View' are you referring to the mapView / webView or an actual React component that's rendering as a view?&lt;BR /&gt;&lt;BR /&gt;We've built a large web application in React using redux, and we store a reference to the mapView / webView in redux after we &lt;SPAN&gt;instantiate&amp;nbsp;&lt;/SPAN&gt;it and call on that if we need to use any operations from it.&lt;BR /&gt;&lt;BR /&gt;e.g: Image we have a completely different React component that renders that has a button or such that needs to move the map.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;moveMap = (target =&amp;gt; { // A function inside a react component that's triggered by a button's onClick event

const { mapView } = this.props // reference we've injected into this functional component from redux.

mapView.goto(target)
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Is there any further information you can provide to clarify the issue?&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 03:03:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-calcite-components-and-arcgis-maps-sdk-for/m-p/1286590#M81075</guid>
      <dc:creator>JamesIng</dc:creator>
      <dc:date>2023-05-08T03:03:24Z</dc:date>
    </item>
  </channel>
</rss>

