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

query-params-data

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

query-params-data

A React, Typescript, and Parcel boilerplate

latest
Source
npmnpm
Version
0.2.2
Version published
Maintainers
1
Created
Source

query-params-data

Actions Status

Easily control data in query params.

  • set data at a specific query param
  • subscribe to changes of data at different query param keys.

Usage

import UrlStore from 'query-params-data';

// control the `user_id` query param
const userIdUrlStore = new UrlStore('user_id');

// set data to the `user_id` query param
userIdUrlStore.setState('1');

// subscribe to changes of the `user_id` query param or get the existing state at startup
const onChange = state => console.log(`The current user id is ${state}`);
userIdUrlStore.subscribeToStateChanges(onChange);

FAQs

Package last updated on 11 Mar 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