tomwayson / create-arcgis-app

An example of how to use the ArcGIS platform in an application created with Create React App and React Router
https://create-arcgis-app.surge.sh/
23 stars 8 forks source link

add error boundaries #24

Open tomwayson opened 5 years ago

tomwayson commented 5 years ago

https://reactjs.org/docs/error-boundaries.html

Probably at the top level of each route, and maybe around the nav?

Would be ideal if we could get rid of the catch for fetching items:

https://github.com/tomwayson/create-arcgis-app/blob/53e2c4ade561bf8e1e68fef159dedfc4b724414f/src/routes/Items.js#L50-L56

I also wonder what happens if there are JSAPI errors w/in an error boundary. Should test that and maybe explicitly add one around the map component.