
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@imjakechapman/use-query-params
Advanced tools
React hook to easily read and manipulate query params
React hook to easily read and manipulate query params
yarn add @imjakechapman/use-query-params
npm install @imjakechapman/use-query-params
import React, { useState } from 'react';
import { useQueryParams } from 'use-query-params';
// Types of all your query parameters
type QueryParams = {
search?: string;
options?: string[];
map?: {
[key: string]: any;
},
};
// Your default parameters
const defaultParams: QueryParams = {
search: 'immadefaultparam',
options: ['well', 'so', 'am', 'i', '!'],
map: {
dont: [
"forget",
"about",
"me",
],
},
};
const App: React.FC = () => {
const { queryParams, updateQueryParams } = useQueryParams<QueryParams>(defaultParams);
function updateSomeParam() {
updateQueryParams({
...queryParams,
search: "immaNewValue",
});
}
return (
<h1>Enjoy your params</h1>
<pre>
{JSON.stringify(queryParams, null, 2)}
</pre>
)
}
export default App;
MIT © imjakechapman
This hook is created using create-react-hook.
FAQs
React hook to easily read and manipulate query params
We found that @imjakechapman/use-query-params demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.