Gathering detailed insights and metrics for @scaleway/use-query-params
Gathering detailed insights and metrics for @scaleway/use-query-params
Gathering detailed insights and metrics for @scaleway/use-query-params
Gathering detailed insights and metrics for @scaleway/use-query-params
scaleway-lib is a set of NPM packages used at Scaleway
npm install @scaleway/use-query-params
Typescript
Module System
Min. Node Version
Node Version
NPM Version
59.3
Supply Chain
91.5
Quality
88.4
Maintenance
100
Vulnerability
100
License
@scaleway/use-dataloader@5.4.0
Updated on May 14, 2025
@scaleway/use-dataloader@5.3.0
Updated on Apr 17, 2025
@scaleway/regex@5.3.1
Updated on Apr 01, 2025
@scaleway/use-i18n@7.1.0
Updated on Mar 25, 2025
@scaleway/eslint-config-react@5.2.9
Updated on Mar 20, 2025
@scaleway/validate-icu-locales@3.1.13
Updated on Mar 20, 2025
TypeScript (90.8%)
JavaScript (8.85%)
Python (0.35%)
Total Downloads
516,727
Last Day
559
Last Week
1,767
Last Month
9,086
Last Year
98,131
MIT License
28 Stars
2,954 Commits
10 Forks
11 Watchers
37 Branches
42 Contributors
Updated on May 14, 2025
Minified
Minified + Gzipped
Latest Version
5.0.14
Package Id
@scaleway/use-query-params@5.0.14
Unpacked Size
8.39 kB
Size
2.92 kB
File Count
5
NPM Version
10.8.2
Node Version
20.18.3
Published on
Mar 09, 2025
Cumulative downloads
Total Downloads
2
3
3
@scaleway/use-query-params
1$ pnpm add @scaleway/use-query-params react-router-dom
1import React from 'react' 2import { render } from 'react-dom' 3import { BrowserRouter as Router } from 'react-router-dom' 4import useQueryParams from '@scaleway/use-query-params' 5 6const App = () => { 7 const { queryParams, setQueryParams } = useQueryParams() 8 const { user } = queryParams 9 const setUser = () => setQueryParams({ user: 'John' }) 10 // ?user=John 11 12 return ( 13 <> 14 <h1>User: {user}</h1> 15 <button onClick={setUser}>Set User John</button> 16 </> 17 ) 18} 19 20render( 21 <Router> 22 <App /> 23 </Router>, 24 document.getElementById('react-root'), 25)
Merge current query params with the new ones passed in parameters.
1// In this exemple we assume that we have an URL that include : `?company=Scaleway". 2import React from 'react' 3import useQueryParams from '@scaleway/use-query-params' 4 5const Component = () => { 6 const { queryParams, setQueryParams } = useQueryParams() 7 const { user, company } = queryParams // user will be undefined and company will be "Scaleway" 8 const setUser = () => setQueryParams({ user: 'John' }) // user will be "John" and company will be "Scaleway" 9 // ?company=Scaleway&user=John 10 11 return ( 12 <> 13 <h1>User: {user}</h1> 14 <h1>Company: {company}</h1> 15 <button onClick={setUser}>Set User John</button> 16 </> 17 ) 18}
Erase current query params and replace by the new ones passed in parameters.
1// In this exemple we assume that we have an URL that include : `?company=Scaleway". 2import React from 'react' 3import useQueryParams from '@scaleway/use-query-params' 4 5const Component = () => { 6 const { queryParams, replaceQueryParams } = useQueryParams() 7 const { user, company } = queryParams // user will be undefined and company will be "Scaleway" 8 const setUser = () => replaceQueryParams({ user: 'John' }) // user will be "John" and company will be undefined 9 // ?user=John 10 11 return ( 12 <> 13 <h1>User: {user}</h1> 14 <h1>Company: {company}</h1> 15 <button onClick={setUser}>Set User John</button> 16 </> 17 ) 18}
To avoid mutating history
1// In this exemple we assume that we have an URL that include : `?company=Scaleway". 2import React from 'react' 3import useQueryParams from '@scaleway/use-query-params' 4 5const Component = () => { 6 const { queryParams, replaceQueryParams } = useQueryParams() 7 const { user, company } = queryParams // user will be undefined and company will be "Scaleway" 8 const setUser = () => replaceQueryParams({ user: 'John' }, { push: true }) // user will be "John" and company will be undefined 9 // ?user=John 10 11 return ( 12 <> 13 <h1>User: {user}</h1> 14 <h1>Company: {company}</h1> 15 <button onClick={setUser}>Set User John</button> 16 </> 17 ) 18}
No vulnerabilities found.
Reason
30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
4 existing vulnerabilities detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
172.7%
559
Compared to previous day
Last Week
66.1%
1,767
Compared to previous week
Last Month
10%
9,086
Compared to previous month
Last Year
-55.2%
98,131
Compared to previous year