Locations
Set Location
Hooks currently do not support automatic change detection in variables.
1
Import the useSetDocumentId and useSetLocation hooks
2
Set the document ID
3
Set the Location
A Location can be described using any plain JSON object and can be set using the useSetLocation
hook.
This object could represent your app’s pages, sections, versions, video frames, or data points on maps/charts etc.
There are three important fields you should care about in your location
object that are protected keywords:
id
- a unique ID to identify your location. It can be used by other methods to find or remove the location later. This field is required.locationName
- a name to describe your location. It is used by other Velt components, such as theVeltCommentsSideBar
, to label your location. This field is optional but highly recommended.version
- an object that includes anid
andname
to mark the specific version of your location. This field is optional.
Was this page helpful?