<?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: How to use arcgis api 4.x with vuex? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-arcgis-api-4-x-with-vuex/m-p/760262#M70465</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you share your code with us?&amp;nbsp; I inherited a project done in vuex and I might be able to compare/ offer suggestions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 May 2019 19:45:57 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2019-05-17T19:45:57Z</dc:date>
    <item>
      <title>How to use arcgis api 4.x with vuex?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-arcgis-api-4-x-with-vuex/m-p/760261#M70464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I'm trying to use arcgis js api in a vue application which manages state with vuex. Since I have several components that uses the mapview (e.g. search, measure, etc), I would like to share the mapview object via the vuex state. When I try to do this, I get errors like this:&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Error: [vuex] do not mutate vuex store state outside mutation handlers.&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I'm guessing this is because the mapview is mutating internally. For example the extent is changing when panning the map. Based on this I was thinking that I cannot use vuex to share the mapview. However, there is a project on github (&lt;A class="" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2Fmunkh-altai%2FArcGIS-Vue" rel="nofollow" style="color: #287433; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;https://github.com/munkh-altai/ArcGIS-Vue&lt;/A&gt;) where they actually do this without producing any errors. I've tried replicating the logic of this project in my project but I still get errors.&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Does anyone know if it is possible to share the mapview/sceneview/map-object in a vuex store? If so, how?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2019 07:23:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-arcgis-api-4-x-with-vuex/m-p/760261#M70464</guid>
      <dc:creator>ae</dc:creator>
      <dc:date>2019-05-16T07:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to use arcgis api 4.x with vuex?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-arcgis-api-4-x-with-vuex/m-p/760262#M70465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you share your code with us?&amp;nbsp; I inherited a project done in vuex and I might be able to compare/ offer suggestions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2019 19:45:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-arcgis-api-4-x-with-vuex/m-p/760262#M70465</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-05-17T19:45:57Z</dc:date>
    </item>
  </channel>
</rss>

