🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

react-us-states

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-us-states

React Hooks extensions to states-us npm package.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

react-us-states

React Hooks module for the states-us package.

npm version npm-publish npm downloads

Installation

To install react-ntc with npm:

npm install react-us-states

To install react-ntc with yarn:

yarn add react-us-states

Types

interface StateObject {
	name: string;
  abbreviation: string;
  territory: boolean;
  contiguous: boolean;
}

interface StateMap {
	[abbreviation: string]: string;
}

interface FullStateMap {
  [abbreviation: string]: StateObject;
}

type StateTuple = [
  name: string,
  abbreviation: string,
  territory: boolean,
  contiguous: boolean
];

Hooks

useStates()

useStateMap()

useFullStateMap()

useStateTuples()

useStateNameLookup(abbreviation: string)

useStateObjectLookup(abbreviation: string)

Demo

View demo here: https://alehechka.github.io/react-us-states/

License

This project is licensed under the terms of the MIT license.

Keywords

react

FAQs

Package last updated on 10 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts