https://kotlinlang.org logo
Title
s

Shubham Singh

04/05/2023, 3:28 PM
Hi everyone How do you guys set search query parameters in Kotlin/JS? Afaik, if we’re using react-router-dom in JS/TS, we can write the following
let params = serializeFormQuery(event.target);
setSearchParams(params);
I’m not sure how to do the same in Kotlin/JS as
serializeFormQuery
function is not available and
setSearchParams
function takes in a value of type
Any
on which I can’t seem to get even
jso
to work. Does anyone have an idea on how to pass query params in Kotlin/JS?
c

CLOVIS

04/05/2023, 3:31 PM
You can use
window.location.search
: https://stackoverflow.com/a/41542008