<?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: ArcGIS JS API 4.x not supported with VueJS 3.0? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/120229#M11199</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/2202"&gt;Andy Gup&lt;/A&gt;‌ - Will 4.18 maybe address this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Nov 2020 16:33:56 GMT</pubDate>
    <dc:creator>Jay_Gregory</dc:creator>
    <dc:date>2020-11-04T16:33:56Z</dc:date>
    <item>
      <title>ArcGIS JS API 4.x not supported with VueJS 3.0?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/120227#M11197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Esri's JS API worked beautifully with VueJS 2.x - however trying to incorporate into a VueJS 3.0 application is proving to be challenging, and I'm wondering if the incompatibilities are irreconcilable without significant changes to the API.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although I can't know for sure, I think the issue revolves around that Vue3.0 wraps all reactive objects in a JavaScript Proxy object, which allows it to intercept / trap getters and setters.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From Vue's own documentation:&lt;/P&gt;&lt;P style="color: #2c3e50; background-color: #ffffff;"&gt;&lt;EM&gt;The use of Proxy does introduce a new caveat to be aware with: the proxied object is not equal to the original object in terms of identity comparison (&lt;CODE&gt;===&lt;/CODE&gt;). For example:&amp;nbsp; The original and the wrapped version will behave the same in most cases, but be aware that they will fail operations that rely on strong identity comparisons.&lt;/EM&gt;&lt;/P&gt;&lt;P style="color: #2c3e50; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="color: #2c3e50; background-color: #ffffff;"&gt;Creating a simple map with a feature layer, for example, if the feature layer is a reactive object in the VueJS 3.0 ecosystem, gives some strange errors and requires a workaround.&amp;nbsp; The following code is using the new Composition API in Vue (that is why I&amp;nbsp;reference everything with the&amp;nbsp;&lt;EM&gt;value&lt;/EM&gt; property but it is the correct programming pattern here), and throws an error at the last line - the layer is never added to the map. To those familiar with the Composition API, using a &lt;EM&gt;reactive&amp;nbsp;&lt;/EM&gt;object (instead of &lt;EM&gt;ref&lt;/EM&gt; like in the code) generates the same issues.&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; featurelayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;ref&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
featurelayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;value &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;featurelayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;value&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN style="color: #ff0000;"&gt;Uncaught (in promise) TypeError: 'get' on proxy: property '__accessor__' is a read-only and non-configurable data property on the proxy target but the proxy did not return its actual value (expected '#&amp;lt;a&amp;gt;' but got '[object Object]')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;However, if I change the last line to&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;map.add(featurelayer.value.load());&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The layer is successfully added.&amp;nbsp; An acceptable but annoying workaround as an application scales.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are other issues however for which I have been unable to find a workaround.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;mapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;whenLayerView&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;featurelayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;value&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;then&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layerView&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
   console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layerView&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;throws the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp;Uncaught (in promise) e {name: "view:no-layerview-for-layer", details: {…}, message: "No layerview has been found for the layer".&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using featurelayer.value.load() or featurelayer.value.createLayerView() does not work.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So ultimately I'm curious if anyone knows what is happening with these seeming incompatibilities, and more specifically, if the Esri JS API team would ever consider making the changes necessary to play well with a (increasing in popularity) framework such as VueJS 3.x.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:59:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/120227#M11197</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2021-12-11T06:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API 4.x not supported with VueJS 3.0?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/120228#M11198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/36951"&gt;Noah Sager&lt;/A&gt;‌ &lt;A href="https://community.esri.com/migrated-users/2036"&gt;Jim Barry&lt;/A&gt;‌ - Curious if anyone on the API team is aware of this and/or knows of any workarounds or resolutions.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 11:12:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/120228#M11198</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2020-10-29T11:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API 4.x not supported with VueJS 3.0?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/120229#M11199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/2202"&gt;Andy Gup&lt;/A&gt;‌ - Will 4.18 maybe address this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2020 16:33:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/120229#M11199</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2020-11-04T16:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API 4.x not supported with VueJS 3.0?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/120230#M11200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jay, thanks for reporting this, we are aware. There's a possibility that a general fix already being working on&amp;nbsp;for Accessor in 4.18 might fix your issue. I'm not sure exactly when the fix will be checked in, but you will be able to test it out on /next build prior to the production release:&amp;nbsp;&lt;A class="jivelink10" href="https://github.com/Esri/feedback-js-api-next" title="https://github.com/Esri/feedback-js-api-next"&gt;https://github.com/Esri/feedback-js-api-next&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2020 19:46:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/120230#M11200</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2020-11-04T19:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API 4.x not supported with VueJS 3.0?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/120231#M11201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Andy!&amp;nbsp; I'm glad you're aware of it, and it's on your fix radar.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2020 20:25:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/120231#M11201</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2020-11-04T20:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API 4.x not supported with VueJS 3.0?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1010906#M71142</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/180"&gt;@AndyGup&lt;/a&gt;&amp;nbsp;-&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andy, correct me if I'm wrong, but this didn't seem to be resolved with 4.18.&amp;nbsp; I threw together a quick github repo to reproduce errors @&amp;nbsp;&lt;A href="https://github.com/crackernutter/vuejs3-arcgisapi-test" target="_blank" rel="noopener"&gt;https://github.com/crackernutter/vuejs3-arcgisapi-test&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Curious if you think this might be resolved at 4.19?&amp;nbsp; I was waiting to develop a couple apps until VueJS 3.x compatibility with your API was resolved.&amp;nbsp; If this isn't in the pipeline for the near term that's fine - I would just love to know.&amp;nbsp; I would hate to move forward with VueJS 2.x development only to have this issue resolved in March.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 14:32:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1010906#M71142</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2020-12-18T14:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API 4.x not supported with VueJS 3.0?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1037636#M72097</link>
      <description>&lt;P&gt;So I think there are some issues here in the patterns being used.&amp;nbsp; One of the nice things about the Composition API and Vue3 in general is you can explicitly choose what is reactive and what isn't.&amp;nbsp; In my opinion, I don't think you want to make your &lt;STRONG&gt;view&lt;/STRONG&gt; and &lt;STRONG&gt;layer&lt;/STRONG&gt; reactive.&lt;/P&gt;&lt;P&gt;If you really do need to handle changes on the view or layer, you can either use the &lt;A title="Accessor Watch Method" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html#watch" target="_blank" rel="noopener"&gt;Accessor watch method&lt;/A&gt;, or &lt;A title="watchUtils" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html" target="_blank" rel="noopener"&gt;watchUtils&lt;/A&gt;.&amp;nbsp; Then anything on the Vue side that needs to be reactive should be reactive.&amp;nbsp; This way, you're not creating extra overhead or reinventing the wheel on watching/handling changes to these objects.&lt;/P&gt;&lt;P&gt;I was able to get your sample working without throwing errors with the following code in App.vue:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CalebMackey1_0-1615997750314.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8698i1E206D0EA6BC013C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CalebMackey1_0-1615997750314.png" alt="CalebMackey1_0-1615997750314.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import Map from "@arcgis/core/Map";
import MapView from "@arcgis/core/views/MapView";
import FeatureLayer from "@arcgis/core/layers/FeatureLayer";
import { defineComponent, nextTick } from "vue";


export default defineComponent({
  
  setup() {
    /**
     * do we really want vue to make these reactive? Are they really going to change?
     * this will add extra overhead. If we need to handle reactive changes on esri stuff,
     * we can take advantage by using "esri/core/watchUtils" or by using the Accessor.watch()
     */
    // let layer = ref(null);
    // let view = ref(null);

    //same issues with reactive object as well
    ///let app = reactive({ zones: null, view:null });
    
    // instead declare them as static data properties
    const map = new Map({
      basemap: "topo-vector",
    });

    const view = new MapView({
      container: "esri-map", // just pass this here to set required property
      map,
      zoom: 5,
      center: [-95, 39],
      popup: {
        autoOpenEnabled: false,
      },
    });

    const layer = new FeatureLayer({
      portalItem: {
        id: "9e2f2b544c954fda9cd13b7f3e6eebce",
      },
      outFields: ["*"],
      title: "Recent Earthquakes",
    });

    map.add(layer)

    return {
      view,
      map,
      layer
    }

  },

  created(){
    // verify we have access to view, layer
    console.log('view: ', this.view)
    console.log('map: ', this.map)
    
    /**
     * the map actually won't render from our setup() because the
     * "esri-map" div does not exist yet, so we must re-set it here 
     */
    nextTick(()=&amp;gt; this.view.container = this.$refs.esriMap)

    // here is where we can actually test things out
    this.view.whenLayerView(this.layer).then((layerView) =&amp;gt; {
      console.log("layerview generated");
      console.log(layerView);
    });
  }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 16:16:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1037636#M72097</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-03-17T16:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API 4.x not supported with VueJS 3.0?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1037650#M72098</link>
      <description>&lt;P&gt;Thank you Caleb!&amp;nbsp; This is incredibly useful - I will dig into the code.&amp;nbsp; I was afraid I'd have to go the "change pattern" route by using Esri's baked in watchUtils.&amp;nbsp; I'm concerned that as the application scales, using two different reactivity programming patterns (one for Esri JS API objects, one for the rest) might prove unwieldy and confusing.&amp;nbsp; Mostly as I look to refactor a sizable Vue 2.x application that relied heavily on reactivity of various Esri JS objects (Vue 2.x's reactivity did work with Esri's JA API), I'm just grappling with having to swap out Vue's reactivity with Esri's.&amp;nbsp; Not impossible, but also not fun.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Various components that watch for a layer's visibility or opacity change, when graphics are added to a graphicsLayer, when a search source changes in a search widget, passing objects between components as props are all pieces that might need to be refactored for this new pattern.&amp;nbsp; But who knows - maybe it'll be simpler than I think.&amp;nbsp; I was just hoping that Esri would fix it, but totally understand that it quite clashes with the way they've built their API.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 16:20:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1037650#M72098</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2021-03-17T16:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API 4.x not supported with VueJS 3.0?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1037731#M72100</link>
      <description>&lt;P&gt;No problem.&amp;nbsp; This concerns me a bit too as we use Vue for all of our apps as well.&amp;nbsp; They are currently all written in Vue 2.x, but future apps may be built with 3.x.&amp;nbsp; We use vuex heavily for state management in larger apps and if we cannot store esri objects there due the conflicts with Accessor, we may be in trouble.&lt;/P&gt;&lt;P&gt;Hopefully refactoring won't be too bad and will likely involve shifting things from Vue watchers to accessor watchers/watchUtils in the created() method.&amp;nbsp; I know in the past in terms of watching things like graphics array updates, we have always used esri watchers for that since they are &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html" target="_blank" rel="noopener"&gt;Collections&lt;/A&gt; and not actually native Arrays.&lt;/P&gt;&lt;P&gt;The best solution is what you mentioned though, which is that hopefully esri can address this somehow.&amp;nbsp; I feel this will present some major challenges as the conflict seems to be tied to reactivity/getters/setters built-in into Accessor, which is at the core of almost everything in the JS API.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 18:04:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1037731#M72100</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-03-17T18:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API 4.x not supported with VueJS 3.0?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1037741#M72101</link>
      <description>&lt;P&gt;I have the same concerns with Vuex too....and agree that their modifying Accessor to support Proxy would be a tall order.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 18:20:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1037741#M72101</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2021-03-17T18:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API 4.x not supported with VueJS 3.0?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1038781#M72139</link>
      <description>&lt;P&gt;@Anonymous User&amp;nbsp; -&lt;/P&gt;&lt;P&gt;I've been taking a look at the code and was curious if you think your code could be adjusted to work with esri-loader?&amp;nbsp; I'm having a little trouble getting it to work, since the setup function needs to include onMounted (due to the asych nature of esri-loader's loadModules), but the return portion of setup (outside the onMounted callback) would only be able to return reactive objects (which cannot be Esri objects as we've determined).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason I ask is because vue-cli with&amp;nbsp;@arcgis/core build time leaves something to be desired.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In other words, would&amp;nbsp;&lt;A href="https://github.com/crackernutter/vuejs3-arcgisapi-test/blob/main/src/App.vue" target="_blank" rel="noopener"&gt;https://github.com/crackernutter/vuejs3-arcgisapi-test/blob/main/src/App.vue &lt;/A&gt;be able to use esri-loader, or does it have to use the ES6 modules of Esri's API?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2021 18:41:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1038781#M72139</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2021-03-19T18:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API 4.x not supported with VueJS 3.0?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1039597#M72168</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/202029"&gt;@Jay_Gregory&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This was a bit tricky, as it requires using an Async Setup Method and &lt;A href="https://vueschool.io/articles/vuejs-tutorials/suspense-new-feature-in-vue-3/" target="_self"&gt;Suspense&lt;/A&gt;.&amp;nbsp; And I totally get it, adding&amp;nbsp;@arcgis/core to the app makes the dev build much slower and production builds much larger.&amp;nbsp; I created an "esri-loader" &lt;A href="https://github.com/CalebM1987/vuejs3-arcgisapi-test/tree/esri-loader" target="_self"&gt;branch in my fork of the repo&lt;/A&gt;.&amp;nbsp; So to use the esri-loader, I made the following tweaks:&lt;/P&gt;&lt;P&gt;Created a new Component called Mapview.vue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import { defineComponent, nextTick } from "vue";
import { loadModules } from 'esri-loader'

export default defineComponent({
  
  async setup() {
    /**
     * do we really want vue to make these reactive? Are they really going to change?
     * this will add extra overhead. If we need to handle reactive changes on esri stuff,
     * we can take advantage by using "esri/core/watchUtils" or by using the Accessor.watch()
     */
    
    try {
      const [Map, MapView, FeatureLayer] = await loadModules(["esri/Map", "esri/views/MapView", "esri/layers/FeatureLayer"])
    
      // work with esri modules here
      // instead declare them as static data properties
      const map = new Map({
        basemap: "topo-vector",
      });

      const view = new MapView({
        container: "esri-map", // just pass this here to set required property
        map,
        zoom: 5,
        center: [-95, 39],
        popup: {
          autoOpenEnabled: false,
        },
      });

      const layer = new FeatureLayer({
        portalItem: {
          id: "9e2f2b544c954fda9cd13b7f3e6eebce",
        },
        outFields: ["*"],
        title: "Recent Earthquakes",
      });

      map.add(layer)

      return {
        view,
        map,
        layer
      }

    
    } catch (error) { 
      // handle any script or module loading errors
      console.error(error)
    }
    
  },

  created(){
    // verify we have access to view, layer
    console.log('view: ', this.view)
    console.log('map: ', this.map)
    
    /**
     * the map actually won't render from our setup() because the
     * "esri-map" div does not exist yet, so we must re-set it here 
     */
    nextTick(()=&amp;gt; {
      // I was having issues with race conditions here, had to set a small timeout
      setTimeout(()=&amp;gt; {
        this.view.container = this.$refs.esriMap
        console.log('view container: ', this.view.container)
      }, 150)
    })

    // here is where we can actually test things out
    this.view.whenLayerView(this.layer).then((layerView) =&amp;gt; {
      console.log("layerview generated");
      console.log(layerView);
    });
  }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then using Suspense in the App.vue template:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;template&amp;gt;
  &amp;lt;div id="container"&amp;gt;
    &amp;lt;Suspense&amp;gt;
      &amp;lt;template #default&amp;gt;
        &amp;lt;!-- main async content goes here --&amp;gt;
        &amp;lt;map-view /&amp;gt;
      &amp;lt;/template&amp;gt;

      &amp;lt;template #fallback&amp;gt;
        &amp;lt;!-- fallback content goes here while component is loading --&amp;gt;
        &amp;lt;h3 class="loader"&amp;gt;Loading...&amp;lt;/h3&amp;gt;
      &amp;lt;/template&amp;gt;

    &amp;lt;/Suspense&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/template&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, if you like using the esri-loader, I built a cool &lt;A href="https://marketplace.visualstudio.com/items?itemName=CalebMackey.esri-loader-typings-helper" target="_self"&gt;VS Code Plugin&lt;/A&gt; that auto completes the loadModules() function (also supports TypeScript):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="plugin-async-js.gif" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/9148iF0A8D46DDF9D72C4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="plugin-async-js.gif" alt="plugin-async-js.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 00:13:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1039597#M72168</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-03-23T00:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API 4.x not supported with VueJS 3.0?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1046582#M72504</link>
      <description>&lt;P&gt;Just wanted to loop back with you on this and thank you again.&amp;nbsp; I forgot you can add non tracked/non-reactive objects to a component instance, so that seemed to do the trick to get me up and running.&lt;/P&gt;&lt;P&gt;Unfortunately, we use Vuex a lot too, particularly to store the MapView to pass to different components &amp;amp; widgets across the app.&amp;nbsp; I just tried implementing this (vuex storing the MapVuew) for a feature table, and while the table renderers, the synchronized behavior with the actual map unfortunately does not work (ie, editing, center on click, highlight, etc). &amp;nbsp;After digging into the Vue reactivity documentation, I found markRaw and toRaw, which can be used on Esri’s object to prevent them from being wrapped in a Proxy or strip away the proxy, respectively. &amp;nbsp;I think it’s exactly what you’d need to use Esri’s JS objects in Vuex.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 01:50:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1046582#M72504</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2021-04-15T01:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API 4.x not supported with VueJS 3.0?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1197752#M78118</link>
      <description>&lt;P&gt;in 4.24&amp;nbsp; &amp;nbsp;it is not solved.&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jul 2022 13:52:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1197752#M78118</guid>
      <dc:creator>baohuachu2</dc:creator>
      <dc:date>2022-07-31T13:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API 4.x not supported with VueJS 3.0?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1197979#M78124</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/115883"&gt;@baohuachu2&lt;/a&gt;&amp;nbsp;Yeah, I'm unsure if Esri will change their API to support native Proxy objects like Vue uses.&amp;nbsp; Some of the additional code examples at the bottom of this thread show some good patterns for working with Vue 3.x and AGIS JS API.&amp;nbsp; In short, don't set your esri objects (map view, map, etc) to be vue reactive in your individual components, but instead use the AGIS JS API to handle the reactivity of Esri objects.&amp;nbsp; You can create non reactive objects and return them in the setup function to use through the rest of your component.&amp;nbsp; I don't think this kind of option existed for Vue2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are using Vuex, I believe I ended up using toRaw and markRaw (&lt;A href="https://vuejs.org/api/reactivity-advanced.html#toraw" target="_blank"&gt;https://vuejs.org/api/reactivity-advanced.html#toraw&lt;/A&gt;) to handle reactivity of Esri objects in Vuex.&amp;nbsp; Hope this helps.&amp;nbsp; At this point it's been a while so I forget the exact details.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 14:25:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-x-not-supported-with-vuejs-3-0/m-p/1197979#M78124</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2022-08-01T14:25:59Z</dc:date>
    </item>
  </channel>
</rss>

