Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@castiron/hooks

Package Overview
Dependencies
Maintainers
4
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@castiron/hooks

A set of common hooks

latest
Source
npmnpm
Version
3.1.0
Version published
Maintainers
4
Created
Source

common-js/hooks

A repository for common React hooks

Requires

React!

TS Config Setup

To import individual hooks, make sure your project's ts config file has these options:

{
  "compilerOptions": {
    "module": "esnext",
    "moduleResolution": "bundler",
    ...
  }
  ...
}

Importing

@castiron/hooks/ is set up so that you can

# import hooks individually, in little bite sized pieces:
import useLatest from "@castiron/hooks/useLatest";

# or use named imports:
import { useLatest } from "@castiron/hooks";

# to import hooks individually without tsconfig moduleResolution: "bundler", refer to the dist directory:
import useLatest from "@castiron/hooks/dist/useLatest";

Other libraries

To see a list of other supported libraries by team Frontendos, see the resources page in Notion.

FAQs

Package last updated on 08 Feb 2024

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