Skip to content

Query Params syncronization #8126

Answered by Moshyfawn
MursalovAltun asked this question in Ideas
Discussion options

You must be logged in to vote

You can simply watch your form values in a headless component and update the URL as a side-effect inside useEffect accordingly.

const SyncDataUrl = () => {
  const data = useWatch()
  
  useEffect(() => {
    updateUrl(data)
  }, [data, updateUrl])
  
  return null
}

I doubt this feature is gonna be included out of the box, as it's out of the scope of this library.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@MursalovAltun
Comment options

@Moshyfawn
Comment options

@MursalovAltun
Comment options

@bluebill1049
Comment options

@piszczu4
Comment options

Answer selected by bluebill1049
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
4 participants