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?
Solved! Go to Solution.
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 -
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.
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 -
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.
Thanks, Shay. I think the ArcGIS JS API is the problem. I've edited my question to suit this new idea.
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
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.