Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.