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
60.3
Supply Chain
91.5
Quality
93.9
Maintenance
100
Vulnerability
100
License
@scaleway/use-analytics@0.0.8
Updated on Jun 30, 2025
@scaleway/use-analytics@0.0.7
Updated on Jun 26, 2025
@scaleway/use-analytics@0.0.6
Updated on Jun 25, 2025
@scaleway/use-analytics@0.0.5
Updated on Jun 25, 2025
@scaleway/use-analytics@0.0.4
Updated on Jun 24, 2025
@scaleway/use-analytics@0.0.3
Updated on Jun 24, 2025
TypeScript (91.6%)
JavaScript (8.08%)
Python (0.32%)
Total Downloads
520,328
Last Day
117
Last Week
1,708
Last Month
6,196
Last Year
98,242
MIT License
29 Stars
3,056 Commits
11 Forks
11 Watchers
30 Branches
41 Contributors
Updated on Jun 30, 2025
Minified
Minified + Gzipped
Latest Version
5.0.15
Package Id
@scaleway/use-query-params@5.0.15
Unpacked Size
8.39 kB
Size
2.92 kB
File Count
5
NPM Version
10.8.2
Node Version
20.19.2
Published on
Jun 23, 2025
Cumulative downloads
Total Downloads
Last Day
-24%
117
Compared to previous day
Last Week
38.4%
1,708
Compared to previous week
Last Month
-35.8%
6,196
Compared to previous month
Last Year
-52.1%
98,242
Compared to previous year
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
no dangerous workflow patterns detected
Reason
30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
4 existing vulnerabilities detected
Details
Reason
Found 0/6 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
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-06-23
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 More