New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

use-param-state

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-param-state

React hook that works much like useState, but it encodes the state and saves it in a parameter in the URL

latest
Source
npmnpm
Version
0.0.10
Version published
Maintainers
1
Created
Source

useParamState

React hook that works much like useState, but it encodes the state and saves it in a parameter in the URL.

Installation

yarn add use-param-state or npm i use-param-state

Usage

The hook accepts an object as a prop with the following properties:

  • initialState?: <T> – The initial state
  • key: string – The URL parameter key for the encoded state
import {useParamState} from 'use-param-state'

const [state, setState] = useParamState<string>({
  initialState: 'Hello world',
  key: 'myKey',
})

Keywords

params

FAQs

Package last updated on 03 Sep 2022

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