Skip to content

mahmodghnaj/Sync-state-with-URL

Repository files navigation

Ability to push changes to url without re-rendering

If you are working on a project that includes a page similar to Google Maps, where users can zoom or move the map around, the URL should be updated with the new center latitude and longitude values. The URL format might look like this: /30.7921211,-101.7344277,7.23/, where the first value represents the latitude, the second value represents the longitude, and the third value represents the zoom level.

Alternatively, if you are working on a project with a table that includes various filters, such as filtering by name or age, the URL should be updated with the new name and age values. The URL format might look like this: /tony,32/, where the first value represents the name and the second value represents the age.