npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-arcgis-js

v0.2.1

Published

React components for the ArcGIS JS API

Downloads

7

Readme

react-arcgis-js

A set of React components for the 4.0 version of the ArcGIS API for JavaScript

Build Status

alt text

Installation

Add the package from npm:

$ npm install --save react-arcgis-js
# or
$ yarn add react-arcgis-js

Load the JS API styles:

<link href="https://js.arcgis.com/4.6/esri/css/main.css" rel="stylesheet">

Basic Usage

Render a Map:

import React from 'react';
import ReactDOM from 'react-dom';
import { Map } from 'react-arcgis-js';

ReactDOM.render(
  <Map />,
  document.getElementById('root')
);

Render a Map and FeatureLayer

import React from 'react';
import ReactDOM from 'react-dom';
import { Map, Feature } from 'react-arcgis-js';

ReactDOM.render(
  <Map>
    <Feature itemId="8444e275037549c1acab02d2626daaee"/>
  </Map>,
  document.getElementById('root')
);

Examples available at https://brygrill.github.io/react-arcgis-js

Components

Map

Render a Map or WebMap. Pass an itemId prop to render WebMap via Portal Item ID or pass a baseMap prop to render a Map.

Props:

| Property | Type | Required | Default | Description | | --- | --- | --- | --- | ----- | | itemId | string | false | None | Id of webmap to load | | baseMap | string | false | streets-navigation-vector | Basemap to load | | height | string | false | 500px | height of map container in px or % | | width | string | false | 100% | width of map container in px or % | | center | array | false | [-122.41, 37.77] | coordinates to center the map on | | zoom | number | false | 10 | starting zoom level of the map | | webGL | boolean | false | false | load dojo config to enable WebGL Feature Layers | | onLoadingContent | any | false | Loading... | string or component to render while loading map | | onErrorContent | any | false | Error loading map... | string or component to render on error | | onError | function | false | None | Will return on error to handle as you wish | | onMapClick | function | false | None | Will return mapPoint and graphics object on map click |

Map Children:
The following props are passed to child components of <Map/>:

| Property | Type | Description | | --- | --- | ----- | | map | object | Map or WebMap object | | view | object | MapView object | | loading | boolean | loading status | | error | boolean | error status |

Feature

Render a FeatureLayer as a child of <Map/> component. Pass a url prop to render via service URL or itemId to render via Portal Item ID.

Props:

| Property | Type | Required | Default | Description | | --- | --- | --- | --- | --- | | url | string | false | None | render FeatureLayer via service URL | | itemId | string | false | None | render FeatureLayer via Portal Item ID |

Acknowledgments

Wouldn't be possible without these projects: