{"id":360552,"date":"2018-12-04T09:28:23","date_gmt":"2018-12-04T17:28:23","guid":{"rendered":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=360552"},"modified":"2018-12-04T11:34:58","modified_gmt":"2018-12-04T19:34:58","slug":"using-react-with-the-arcgis-api-for-javascript","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript","title":{"rendered":"Using React with the ArcGIS API for JavaScript"},"author":7531,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[22941],"tags":[96582,267102,36161,43621],"industry":[],"product":[36831,36601],"class_list":["post-360552","blog","type-blog","status-publish","format-standard","hentry","category-mapping","tag-arcgis-api-for-javascript","tag-react","tag-web-development","tag-webpack","product-js-api-arcgis","product-developers"],"acf":{"short_description":"A short overview of how to use React with the ArcGIS API for JavaScript to build your applications.","flexible_content":[{"acf_fc_layout":"content","content":"<p>The <a href=\"https:\/\/developers.arcgis.com\/javascript\/\" target=\"_blank\" rel=\"noopener\">ArcGIS API for JavaScript<\/a> is a powerful library that you can use to build applications that leverage the power of the <a href=\"https:\/\/developers.arcgis.com\/labs\/what-is-arcgis\/\" target=\"_blank\" rel=\"noopener\">ArcGIS Platform<\/a>. While you can use the ArcGIS API for JavaScript on its own to build compelling web mapping applications, some developers choose to integrate it with other JavaScript libraries and frameworks (in particular with larger web applications).<\/p>\n<p><a href=\"https:\/\/reactjs.org\/\" target=\"_blank\" rel=\"noopener\">React<\/a> is a popular open source JavaScript library that is used for building reusable UI components for web applications. It is fast and simple and pairs really well with the ArcGIS API for JavaScript, which is why this implementation pattern is becoming popular among many developers.<br \/>\nThis blog is a brief overview on how you can get started using React with the ArcGIS API for JavaScript. You can also check out the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/guide\/using-frameworks\/index.html\" target=\"_blank\" rel=\"noopener\">guide page<\/a> in the documentation to learn more about working with React, and libraries and frameworks.<\/p>\n<h2>Getting Started<\/h2>\n<p>You can view the source code for the application we are going to review <a href=\"https:\/\/github.com\/odoe\/jsapi-react\" target=\"_blank\" rel=\"noopener\">on github<\/a>. For this application, we are going to use the <a href=\"https:\/\/github.com\/esri\/arcgis-webpack-plugin\" target=\"_blank\" rel=\"noopener\">@arcgis\/webpack-plugin<\/a> to help us integrate the ArcGIS API for JavaScript into our application.<\/p>\n<p>A best practice is to isolate the work of the API from the UI components that you are going to build. This is nice way to maintain a separation of concerns in your development.<\/p>\n<p>In this example, we are going to do the work of creating our map in <code>data\/app.js<\/code>.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":360712,"id":360712,"title":"jsapi-react-appjs","filename":"jsapi-react-appjs.png","filesize":82262,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-appjs.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript\/jsapi-react-appjs","alt":"jsapi react app","author":"7531","description":"","caption":"data\/app.js","name":"jsapi-react-appjs","status":"inherit","uploaded_to":360552,"date":"2018-11-16 23:00:29","modified":"2018-11-16 23:03:00","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":496,"height":899,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-appjs.png","thumbnail-width":110,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-appjs.png","medium-width":144,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-appjs.png","medium_large-width":496,"medium_large-height":899,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-appjs.png","large-width":496,"large-height":899,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-appjs.png","1536x1536-width":496,"1536x1536-height":899,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-appjs.png","2048x2048-width":496,"2048x2048-height":899,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-appjs.png","card_image-width":257,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-appjs.png","wide_image-width":496,"wide_image-height":899}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>Looking at this code snippet, you can see that this is where we create our map and view, except we do not attach our view to the page right away. We export a function called <code>initialize<\/code> that takes an argument for the container, which is a DOM element where our MapView will be displayed. This DOM element will come from the React component that we will write.<\/p>\n<h2>The Component<\/h2>\n<p>For our <code>WebMap<\/code> component, we are going to take advantage of a brand new feature to React called <a href=\"https:\/\/reactjs.org\/docs\/hooks-reference.html\" rel=\"noopener\" target=\"_blank\">hooks<\/a>. Hooks are still a React proposal and are <a href=\"https:\/\/reactjs.org\/blog\/2018\/11\/27\/react-16-roadmap.html\" rel=\"noopener\" target=\"_blank\">scheduled to be finalized in early 2019<\/a>, so I wouldn&#8217;t recommend using them in production just yet, but I thought it would be fun to use them for this example.<\/p>\n<p>There are numerous React hooks you can use, but for our purposes we are only concerned with two.<\/p>\n<ul>\n<li><a href=\"https:\/\/reactjs.org\/docs\/hooks-reference.html#useeffect\" rel=\"noopener\" target=\"_blank\"><code>useEffect<\/code><\/a><\/li>\n<li><a href=\"https:\/\/reactjs.org\/docs\/hooks-reference.html#useref\" rel=\"noopener\" target=\"_blank\"><code>useRef<\/code><\/a><\/li>\n<\/ul>\n<p>The <code>useEffect<\/code> hook is run after the React component is rendered. This makes it perfectly suited for us to use to dynamically load our <code>data\/app.js<\/code> module and run the <code>initialize<\/code> function we created earlier. But how do we get the element for our component? That&#8217;s where <code>useRef<\/code> comes in!<\/p>\n<p>The <code>useRef<\/code> hook creates an object that exists for as long as the component is mounted. In our case, we want to keep track of the DOM element that is going to be created by our React component. We can see what this looks like in <code>components\/WebMap.js<\/code>.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":360722,"id":360722,"title":"jsapi-react-WebMapjs","filename":"jsapi-react-WebMapjs.png","filesize":48543,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-WebMapjs.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript\/jsapi-react-webmapjs","alt":"","author":"7531","description":"","caption":"components\/WebMap.js","name":"jsapi-react-webmapjs","status":"inherit","uploaded_to":360552,"date":"2018-11-16 23:02:17","modified":"2018-11-16 23:06:14","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":564,"height":559,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-WebMapjs.png","thumbnail-width":202,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-WebMapjs.png","medium-width":263,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-WebMapjs.png","medium_large-width":564,"medium_large-height":559,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-WebMapjs.png","large-width":564,"large-height":559,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-WebMapjs.png","1536x1536-width":564,"1536x1536-height":559,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-WebMapjs.png","2048x2048-width":564,"2048x2048-height":559,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-WebMapjs.png","card_image-width":469,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-WebMapjs.png","wide_image-width":564,"wide_image-height":559}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>Looking at this sample, you can see that we use the <code>useEffect<\/code> hook to lazy load the module that is responsible for handling the mapping portion of our application. This is a useful pattern that you can use in your applications to dynamically load the ArcGIS API for JavaScript in your webpack applications.<\/p>\n<p>Now we can render this component like any other React component in our application.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":360762,"id":360762,"title":"jsapi-react-indexjs","filename":"jsapi-react-indexjs-1.png","filesize":31970,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-indexjs-1.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript\/jsapi-react-indexjs","alt":"","author":"7531","description":"","caption":"index.js","name":"jsapi-react-indexjs","status":"inherit","uploaded_to":360552,"date":"2018-11-16 23:13:50","modified":"2018-11-16 23:13:59","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":583,"height":271,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-indexjs-1.png","thumbnail-width":213,"thumbnail-height":99,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-indexjs-1.png","medium-width":464,"medium-height":216,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-indexjs-1.png","medium_large-width":583,"medium_large-height":271,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-indexjs-1.png","large-width":583,"large-height":271,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-indexjs-1.png","1536x1536-width":583,"1536x1536-height":271,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-indexjs-1.png","2048x2048-width":583,"2048x2048-height":271,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-indexjs-1.png","card_image-width":583,"card_image-height":271,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-indexjs-1.png","wide_image-width":583,"wide_image-height":271}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>Your finished application should look like this, which is a React component that displays a WebMap.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":360772,"id":360772,"title":"jsapi-react-app","filename":"jsapi-react-app.gif","filesize":2544370,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-app.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript\/jsapi-react-app","alt":"","author":"7531","description":"","caption":"","name":"jsapi-react-app","status":"inherit","uploaded_to":360552,"date":"2018-11-16 23:18:41","modified":"2018-11-16 23:18:41","menu_order":0,"mime_type":"image\/gif","type":"image","subtype":"gif","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":707,"height":414,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-app.gif","thumbnail-width":213,"thumbnail-height":125,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-app.gif","medium-width":446,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-app.gif","medium_large-width":707,"medium_large-height":414,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-app.gif","large-width":707,"large-height":414,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-app.gif","1536x1536-width":707,"1536x1536-height":414,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-app.gif","2048x2048-width":707,"2048x2048-height":414,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-app.gif","card_image-width":707,"card_image-height":414,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-app.gif","wide_image-width":707,"wide_image-height":414}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h2>Summary<\/h2>\n<p>We looked at how you can isolate the work of the ArcGIS API for JavaScript to its own module in your application and then dynamically load that module in your React components. We also looked at some of the cutting edge uses of React hooks to help you build your React components with the API.<\/p>\n<p>We have barely scratched the surface of using the ArcGIS API for JavaScript with React. Stay tuned, as I am currently working on a larger application that uses React and some other interesting features of React such as <a href=\"https:\/\/reactjs.org\/docs\/context.html\" rel=\"noopener\" target=\"_blank\">Context<\/a> to manage data and <a href=\"https:\/\/reactjs.org\/docs\/code-splitting.html#reactlazy\" rel=\"noopener\" target=\"_blank\">Suspense<\/a> to lazy load React components!<\/p>\n"}],"authors":[{"ID":7531,"user_firstname":"Rene","user_lastname":"Rubalcava","nickname":"r.rubalcava","user_nicename":"r-rubalcava","display_name":"Rene Rubalcava","user_email":"RRubalcava@esri.com","user_url":"http:\/\/odoe.net\/","user_registered":"2018-03-21 18:21:22","user_description":"SoftWhere Developer, blogger, author, geodev, and connoisseur of programming languages and JavaScript frameworks.\r\n\r\nI blog at https:\/\/odoe.net and post videos at https:\/\/www.youtube.com\/c\/renerubalcava\r\n\r\nI write code, sometimes it even works.","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/03\/ReneRubalcava-213x200.png' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"}],"related_articles":[{"ID":79311,"post_author":"7251","post_date":"2017-09-08 00:43:06","post_date_gmt":"2017-09-08 00:43:06","post_content":"","post_title":"React Redux: Building Modern Web Apps with the ArcGIS JS API","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"react-redux-building-modern-web-apps-with-the-arcgis-js-api","to_ping":"","pinged":"","post_modified":"2020-02-18 09:36:47","post_modified_gmt":"2020-02-18 17:36:47","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/products\/product\/uncategorized\/react-redux-building-modern-web-apps-with-the-arcgis-js-api\/","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"},{"ID":160171,"post_author":"7531","post_date":"2018-04-27 07:00:58","post_date_gmt":"2018-04-27 07:00:58","post_content":"","post_title":"Using the new webpack plugin for the ArcGIS API for JavaScript","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript","to_ping":"","pinged":"","post_modified":"2018-05-03 16:58:56","post_modified_gmt":"2018-05-03 16:58:56","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=160171","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"},{"ID":78451,"post_author":"7011","post_date":"2017-07-14 03:31:00","post_date_gmt":"2017-07-14 03:31:00","post_content":"","post_title":"Manhattan Skyscraper Explorer \u2013 when Open Data and ArcGIS API for JavaScript meet","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"manhattan-skyscraper-explorer-when-open-data-and-arcgis-api-for-javascript-meet","to_ping":"","pinged":"","post_modified":"2020-01-29 01:52:24","post_modified_gmt":"2020-01-29 09:52:24","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/products\/product\/uncategorized\/manhattan-skyscraper-explorer-when-open-data-and-arcgis-api-for-javascript-meet\/","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"},{"ID":80971,"post_author":"5981","post_date":"2017-12-14 10:58:13","post_date_gmt":"2017-12-14 10:58:13","post_content":"","post_title":"Improved TypeScript development with ArcGIS API for JavaScript","post_excerpt":"","post_status":"publish","comment_status":"open","ping_status":"closed","post_password":"","post_name":"improved-typescript-development-with-arcgis-api-for-javascript","to_ping":"","pinged":"","post_modified":"2018-03-26 21:15:49","post_modified_gmt":"2018-03-26 21:15:49","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/products\/product\/uncategorized\/improved-typescript-development-with-arcgis-api-for-javascript\/","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"},{"ID":195412,"post_author":"7531","post_date":"2018-06-21 16:03:06","post_date_gmt":"2018-06-21 16:03:06","post_content":"","post_title":"Introducing a cli for the ArcGIS API for JavaScript","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"introducing-a-cli-for-the-arcgis-api-for-javascript","to_ping":"","pinged":"","post_modified":"2018-06-21 16:03:06","post_modified_gmt":"2018-06-21 16:03:06","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=195412","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"}],"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react-card.jpg","wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react.jpg"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using React with the ArcGIS API for JavaScript<\/title>\n<meta name=\"description\" content=\"How to use React with the ArcGIS API for JavaScript to build your web mapping applications using the latest features of React.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using React with the ArcGIS API for JavaScript\" \/>\n<meta property=\"og:description\" content=\"How to use React with the ArcGIS API for JavaScript to build your web mapping applications using the latest features of React.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2018-12-04T19:34:58+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript\"},\"author\":{\"name\":\"Rene Rubalcava\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5e8200af39ef9d178ccabb08822d96cd\"},\"headline\":\"Using React with the ArcGIS API for JavaScript\",\"datePublished\":\"2018-12-04T17:28:23+00:00\",\"dateModified\":\"2018-12-04T19:34:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript\"},\"wordCount\":8,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"ArcGIS API for JavaScript\",\"react\",\"Web Development\",\"webpack\"],\"articleSection\":[\"Mapping\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript\",\"name\":\"Using React with the ArcGIS API for JavaScript\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2018-12-04T17:28:23+00:00\",\"dateModified\":\"2018-12-04T19:34:58+00:00\",\"description\":\"How to use React with the ArcGIS API for JavaScript to build your web mapping applications using the latest features of React.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using React with the ArcGIS API for JavaScript\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5e8200af39ef9d178ccabb08822d96cd\",\"name\":\"Rene Rubalcava\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/03\/ReneRubalcava-213x200.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/03\/ReneRubalcava-213x200.png\",\"caption\":\"Rene Rubalcava\"},\"description\":\"SoftWhere Developer, blogger, author, geodev, and connoisseur of programming languages and JavaScript frameworks. I blog at https:\/\/odoe.net and post videos at https:\/\/www.youtube.com\/c\/renerubalcava I write code, sometimes it even works.\",\"sameAs\":[\"http:\/\/odoe.net\/\",\"https:\/\/www.facebook.com\/odoenetgeo\/\",\"https:\/\/www.linkedin.com\/in\/renerubalcava\",\"https:\/\/x.com\/odoenet\"],\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/r-rubalcava\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Using React with the ArcGIS API for JavaScript","description":"How to use React with the ArcGIS API for JavaScript to build your web mapping applications using the latest features of React.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript","og_locale":"en_US","og_type":"article","og_title":"Using React with the ArcGIS API for JavaScript","og_description":"How to use React with the ArcGIS API for JavaScript to build your web mapping applications using the latest features of React.","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2018-12-04T19:34:58+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript"},"author":{"name":"Rene Rubalcava","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5e8200af39ef9d178ccabb08822d96cd"},"headline":"Using React with the ArcGIS API for JavaScript","datePublished":"2018-12-04T17:28:23+00:00","dateModified":"2018-12-04T19:34:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript"},"wordCount":8,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["ArcGIS API for JavaScript","react","Web Development","webpack"],"articleSection":["Mapping"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript","name":"Using React with the ArcGIS API for JavaScript","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2018-12-04T17:28:23+00:00","dateModified":"2018-12-04T19:34:58+00:00","description":"How to use React with the ArcGIS API for JavaScript to build your web mapping applications using the latest features of React.","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-react-with-the-arcgis-api-for-javascript#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Using React with the ArcGIS API for JavaScript"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5e8200af39ef9d178ccabb08822d96cd","name":"Rene Rubalcava","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/03\/ReneRubalcava-213x200.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/03\/ReneRubalcava-213x200.png","caption":"Rene Rubalcava"},"description":"SoftWhere Developer, blogger, author, geodev, and connoisseur of programming languages and JavaScript frameworks. I blog at https:\/\/odoe.net and post videos at https:\/\/www.youtube.com\/c\/renerubalcava I write code, sometimes it even works.","sameAs":["http:\/\/odoe.net\/","https:\/\/www.facebook.com\/odoenetgeo\/","https:\/\/www.linkedin.com\/in\/renerubalcava","https:\/\/x.com\/odoenet"],"url":"https:\/\/www.esri.com\/arcgis-blog\/author\/r-rubalcava"}]}},"text_date":"December 4, 2018","author_name":"Rene Rubalcava","author_page":"https:\/\/www.esri.com\/arcgis-blog\/author\/r-rubalcava","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/11\/jsapi-react.jpg","primary_product":"ArcGIS Maps SDK for JavaScript","tag_data":[{"term_id":96582,"name":"ArcGIS API for JavaScript","slug":"arcgis-api-for-javascript","term_group":0,"term_taxonomy_id":96582,"taxonomy":"post_tag","description":"","parent":0,"count":58,"filter":"raw"},{"term_id":267102,"name":"react","slug":"react","term_group":0,"term_taxonomy_id":267102,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":36161,"name":"Web Development","slug":"web-development","term_group":0,"term_taxonomy_id":36161,"taxonomy":"post_tag","description":"","parent":0,"count":19,"filter":"raw"},{"term_id":43621,"name":"webpack","slug":"webpack","term_group":0,"term_taxonomy_id":43621,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"}],"category_data":[{"term_id":22941,"name":"Mapping","slug":"mapping","term_group":0,"term_taxonomy_id":22941,"taxonomy":"category","description":"","parent":0,"count":2692,"filter":"raw"}],"product_data":[{"term_id":36831,"name":"ArcGIS Maps SDK for JavaScript","slug":"js-api-arcgis","term_group":0,"term_taxonomy_id":36831,"taxonomy":"product","description":"","parent":36601,"count":363,"filter":"raw"},{"term_id":36601,"name":"Developers","slug":"developers","term_group":0,"term_taxonomy_id":36601,"taxonomy":"product","description":"","parent":0,"count":764,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=js-api-arcgis","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/360552","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/7531"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=360552"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/360552\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=360552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=360552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=360552"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=360552"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=360552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}