Hi All,
The support documents for frameworks in ArcGIS JS API present before are not found now wondering if they will be added? Looking for sample project to solve below issues
How to use import esri = ___esri in react + Typescript with ArcGIS JS API 4.18
Having below issue with View container able to fix it by adding as any. Looking for any better way?
Many Thanks,
Divya
Solved! Go to Solution.
mapDiv.current as HTMLDivElement
The ref.current from useRef can be Element or undefined. Try to do something like this.
if (mapRef.current) {
// mapRef.current typing should now be inferred as HTMLDivElement
}
If all else fails you can say "as HTMLDivElement"
You can find framework samples on github now.
https://github.com/Esri/jsapi-resources/tree/master/esm-samples
Using the ESM build of @Anonymous User/core doesn't really require framework specific guides anymore. You just integrate it pretty much how you would any third-party library.
Hi Rene,
Thanks for looking into this issue. Yes we have followed the same sample link which was useful.
Tried to do like below but still have issue and ui code is <div className="mapDiv" ref={mapDiv}></div>
Thanks,
Divya
mapDiv.current as HTMLDivElement
its working now!!Thank you