Basic React ArcGIS App provides a very simple start to utilizing the ArcGIS for JS API inside of Create React App. The generation of the map is held in a custom hook to separate the business logic. This app contains only one extra dependency outside of create-react-app, esri-loader.
You can click the "Log Current Center Coordinates" button and then open the dev tools to see that the map view center coordinates are. As you drag the map and click the button again, the coordinates change. This map view
object updates autonomously from react's state. As a whole, Basic React ArcGIS App is meant to act as an easy gateway into map development with React.
In the project directory:
yarn install
yarn start
: starts app, viewable at http://localhost:3000yarn build
: Builds the production appyarn eject
: Ejects the appyarn test
: Runs the tests