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
@scaleway/cookie-consent@2.0.11
Updated on Jul 02, 2025
@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
TypeScript (91.6%)
JavaScript (8.08%)
Python (0.32%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
29 Stars
3,062 Commits
11 Forks
11 Watchers
35 Branches
41 Contributors
Updated on Jul 11, 2025
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
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
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/5 approved changesets -- score normalized to 0
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-06-30
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