Socket
Socket
Sign inDemoInstall

@baggie/react

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@baggie/react - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

4

lib/hooks/useQueryMapper/useQueryMapper.js

@@ -5,3 +5,5 @@ import { useMemo, useRef, useCallback, useEffect } from 'react';

function useQueryMapper(valueToParams, paramsToValue, options) {
const [searchParams, setSearchParams] = useSearchParams();
const [searchParams, setSearchParams] = useSearchParams(
options?.defaultValue ? valueToParams(options.defaultValue) : void 0
);
const state = useMemo(() => {

@@ -8,0 +10,0 @@ const entries = Array.from(searchParams.entries());

{
"name": "@baggie/react",
"version": "1.2.0",
"version": "1.2.1",
"description": "A library of tools for your React project",

@@ -5,0 +5,0 @@ "type": "module",

@@ -16,3 +16,5 @@ import { useCallback, useEffect, useMemo, useRef } from "react";

): [T, (value: T | ((prev: T) => T)) => void] {
const [searchParams, setSearchParams] = useSearchParams();
const [searchParams, setSearchParams] = useSearchParams(
options?.defaultValue ? valueToParams(options.defaultValue) : undefined,
);

@@ -19,0 +21,0 @@ const state = useMemo(() => {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc