Select to view content in your preferred language

Errors in loading custom widget

425
1
09-06-2023 03:25 AM
Labels (1)
VaddineniSrinivasulu
New Contributor

When i load my widget along with other built in widgets widgets are not laoding properly . in console i am seeing 404 errors like below. after refreshing couple of times widget loads properly. Any one help me whats going wrong here..

My widget is just a wrapper on top of React widget which i am geting through cdn link using script tag. i am using useEffect for loading the script file and render in ui . Also i have to import React and ReactDom packages in order to make the widget work using same script tag.

 Why it is trying to load React and other stuff using this kind of urls https://js.arcgis.com/4.26/dojo/React.js

VaddineniSrinivasulu_0-1693995666886.png

@GavinC @David  @JeffreyThompson2 

0 Kudos
1 Reply
JeffreyThompson2
MVP Regular Contributor

Would it be possible for you to post your code? I'm having trouble understanding your process from your description. It sounds like you are trying to import another copy of React from a CDN. That shouldn't be necessary and having multiple copies of React in the same project will definitely result in bugs.

GIS Developer
City of Arlington, Texas
0 Kudos