Select to view content in your preferred language

Deprecated warnings in custom widget

1612
4
Jump to solution
07-30-2020 08:18 PM
AndrewTerwiel
Frequent Contributor

I'm creating a custom widget with ArcGIS JS 4.16 using this example:

Custom Recenter Widget | ArcGIS API for JavaScript 4.16 

EDIT:

I get these warning messages in DevTools when I run the map containing the widget.

When I click on .(index):115 the ArcGis JS 4.16 index file appears, so I think that it's not my code causing these messages, but is actually a bug in the API. Can anyone confirm this?

0 Kudos
1 Solution

Accepted Solutions
shaylavi
Esri Contributor

Hi Andrew,

Can you run a search on your files where you are using tsSupport and paste the code?

I've also used the demo widgets (as suggested in the tutorial) and don't recall any usage of that class name in the files.

I experienced the same frustration as you do, not too long ago - I had different errors, but the learning curve for the new API is quite big. Switching from classic Javascript to React and TypeScript is overwhelming.

I managed to catch up with the syntax and understanding by using the following examples -

GitHub - jcfranco/uc-2017-customizing-widgets: Slides and source code for the "ArcGIS API for JavaSc... 

GitHub - jcfranco/uc-2019-customizing-widgets: Slides and source code for the "ArcGIS API for JavaSc... 

It took many hours of learning, I'm a big believer of the trial and error approach.

Once you understand and follow the way things works when writing in TypeScript and React, it's much smarter and cleaner than classic Javascript.

Shay.

Shay

View solution in original post

4 Replies
shaylavi
Esri Contributor

Hi Andrew,

Can you run a search on your files where you are using tsSupport and paste the code?

I've also used the demo widgets (as suggested in the tutorial) and don't recall any usage of that class name in the files.

I experienced the same frustration as you do, not too long ago - I had different errors, but the learning curve for the new API is quite big. Switching from classic Javascript to React and TypeScript is overwhelming.

I managed to catch up with the syntax and understanding by using the following examples -

GitHub - jcfranco/uc-2017-customizing-widgets: Slides and source code for the "ArcGIS API for JavaSc... 

GitHub - jcfranco/uc-2019-customizing-widgets: Slides and source code for the "ArcGIS API for JavaSc... 

It took many hours of learning, I'm a big believer of the trial and error approach.

Once you understand and follow the way things works when writing in TypeScript and React, it's much smarter and cleaner than classic Javascript.

Shay.

Shay
AndrewTerwiel
Frequent Contributor

Thanks, Shay. I think the ArcGIS JS API is the problem. I've edited my question to suit this new idea.

0 Kudos
ReneRubalcava
Honored Contributor

These warnings don't show up in the live sample, can you please post a repro app. I copied the tutorial you linked locally as well and don't see these warnings.

Custom Recenter Widget | Sample | ArcGIS API for JavaScript 4.16 

0 Kudos
AndrewTerwiel
Frequent Contributor

Just found that I had another custom widget causing these warnings. Once I'd upgraded that to use the helpers from TSLib, the warnings disappeared. So, you're right the example code is correct and works fine.