Query String
Last updated
Was this helpful?
Last updated
Was this helpful?
It can be useful at times to update the browser's query string when your state changes.
Let's say you are building a to search articles, and want the query string to reflect the current search value like so:
This way, when a user hits the back button or bookmarks the page, you can get the initial state out of the query string rather than resetting the every time.
You can add a queryString
variable to your and CBWIRE will update the query string every time the property value changes and also update the property when the query string changes.