Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add URLSearchParams polyfill #257

Open
Valerioageno opened this issue Dec 23, 2024 · 0 comments
Open

Add URLSearchParams polyfill #257

Valerioageno opened this issue Dec 23, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers typescript Requires typescript knowledge

Comments

@Valerioageno
Copy link
Member

Currently, on the client side, in order to set the location.search object, we interact with the URLSearchParams interface.

search: Object.fromEntries(new URLSearchParams(location.search)),

Since we don't have such polyfill we are not actually doing it on the server side, making the search key not meaningful for server side rendering purposes.

This task should introduce the polyfill for the URLSearchParams interface and update the server side context location as following:

// Router Context
...
searchStr: serverSideProps?.searchStr || '',
search: Object.fromEntries(new URLSearchParams(serverSideProps?.searchStr || '')),
@Valerioageno Valerioageno converted this from a draft issue Dec 23, 2024
@Valerioageno Valerioageno added enhancement New feature or request good first issue Good for newcomers typescript Requires typescript knowledge labels Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers typescript Requires typescript knowledge
Projects
Status: Ready
Development

No branches or pull requests

1 participant