You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to use different case for the search params, snake_case in url and camelCase in code.
With the current API of the router that is not possible to be done per route, because validateSearch allows me to specify only a parse function (while params allows me to specify both parse and stringify)
The only way would be to override stringifySearch & parseSearch in the router config with functions that do deep remap of ALL object keys.
Would you consider adding a validateSearch.stringify as an API, similar to params.stringify?
Are there any other options that i have?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
How to use different case for the search params, snake_case in url and camelCase in code.
With the current API of the router that is not possible to be done per route, because
validateSearch
allows me to specify only aparse
function (whileparams
allows me to specify bothparse
andstringify
)The only way would be to override
stringifySearch
&parseSearch
in the router config with functions that do deep remap of ALL object keys.Would you consider adding a
validateSearch.stringify
as an API, similar toparams.stringify
?Are there any other options that i have?
Beta Was this translation helpful? Give feedback.
All reactions