Hi everyone How do you guys set search query param...
# javascript
s
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
Copy code
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
You can use
window.location.search
: https://stackoverflow.com/a/41542008
1
252 Views