JSFiddle - React, Tailwind, and code Playground

HTML

<script>var dojoConfig = { parseOnLoad: true };</script>
    <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.8"></script>
    <script type="text/javascript">
      dojo.require("dijit.layout.BorderContainer");
      dojo.require("dijit.layout.ContentPane");
      dojo.require("esri.map");
      dojo.require("esri.layers.FeatureLayer");
      dojo.require("esri.dijit.Popup");

      var map;
      var featureLayer;
      var popupTemplate;
      
      function init() {
        //setup the map's initial extent 
        var initExtent = new esri.geometry.Extent({"xmin":-7,"ymin":34,"xmax":5,"ymax":42,"spatialReference":{"wkid":4326}});

        //create a popup to replace the map's info window
        var popup = new esri.dijit.Popup(null, dojo.create("div"));
        map = new esri.Map("map", {
          extent: initExtent,
          infoWindow: popup
        });

        //Add the imagery layer to the map. View the ArcGIS Online site for services http://arcgisonline/home/search.html?t=content&f=typekeywords:service    
        var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer");
        map.addLayer(basemap);

        //define a popup template
        popupTemplate = new esri.dijit.PopupTemplate({
          title: "{gnis_name}",
          description:"Length (km): {lengthkm}"
        });

        //create a feature layer based on the feature collection
        featureLayer = new esri.layers.FeatureLayer(fljson, {
          mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,
          id: "dummyLayer",
          //infoTemplate: popupTemplate
          infoTemplate: null
        });
        
        // select features on map click
        dojo.connect(map, "onClick", function(e) {
            console.log("map-onClick");
            featureLayer.infoTemplate = popupTemplate;
            map.infoWindow.clearFeatures();
            //console.log("map click: ",...

CSS

<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dijit/themes/claro/claro.css"/>
    <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/esri/dijit/css/Popup.css"/>
<style>
      html, body { height: 100%; width: 100%; margin: 0; padding: 0; } .esriScalebar{
      padding: 20px 20px; } #map{ padding:0;}
    </style>