Open maartenbreddels opened 8 months ago
Should also improve findability of the search property in the documentation (#469)
@maartenbreddels Can I work on this issue? Let me know how .query should be different than .search
Hi @SarthakNikhal ,
yes, you are more than welcome.
I think for a URL like http://localhost:8765/?a=1&b=2 we should have have router.query == 'a=1&b=2'
.
The current .search
should have been router.search == '?a=1&b=2'
, but we do not want to break that current behaviour.
So I suggest the following:
Please also see https://solara.dev/documentation/advanced/development/setup
Regards,
Maarten
According to https://developer.mozilla.org/en-US/docs/Web/API/Location the .search includes the ? which Solara does not. If we change this, it will be a breaking change because people may already depend on this behaviour.
I suggest we keep
.search
but remove it from the docs (soft deprecation / or maybe include a deprecation warning?)Next, we add
.query
, which should be the valid one, without the '?'