Select to view content in your preferred language

React map is constantly moving on load?

832
1
Jump to solution
10-11-2021 07:45 AM
GeoDev
by
Emerging Contributor

LIVE CODE: https://ggroshansii.github.io/full-stack-gardening-app/

I'm learning react and trying to get my previously created map into a React project. I only want it in one div on one page of the project. 

I followed this example here: https://github.com/davetimmins/create-react-app-esri-loader/ with their live code here: https://davetimmins.github.io/create-react-app-esri-loader/

The problem is when I replicated the example code above, even their project had this problem where the map is constantly moving. Am I missing a dependency or something? 

Here is my main code for the component that has the map: https://github.com/ggroshansii/full-stack-gardening-app/blob/main/src/components/Primary/BodyCompone...

Thank you for the help

0 Kudos
1 Solution

Accepted Solutions
ReneRubalcava
Esri Frequent Contributor

Not quite sure, but I've seen this behavior if the arcgis CSS is not loaded, and looking at the network traffic of your app, I don't see it loading. I don't use esri-loader-react, so not sure if it has to manually load it or not, but would try that first.

View solution in original post

1 Reply
ReneRubalcava
Esri Frequent Contributor

Not quite sure, but I've seen this behavior if the arcgis CSS is not loaded, and looking at the network traffic of your app, I don't see it loading. I don't use esri-loader-react, so not sure if it has to manually load it or not, but would try that first.