% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hooks.R
\name{useViewTransitionState}
\alias{useViewTransitionState}
\title{useViewTransitionState}
\usage{
useViewTransitionState(
  into = NULL,
  as = "children",
  render = NULL,
  to,
  relative = NULL,
  ...
)
}
\arguments{
\item{into}{A component (HTML tag or \pkg{shiny.react}-based element)
that will receive the hook value as the specified prop.}

\item{as}{Character. The name of the component's prop to inject the hook
value into. Defaults to \code{"children"}.}

\item{render}{Optional \code{\link{JS}} function \code{(value) => ReactNode}
used in place of \code{into}/\code{as}.}

\item{to}{Character. The destination path being transitioned to.}

\item{relative}{Optional character. Either \code{"route"} (default) or
\code{"path"}.}

\item{...}{Additional props to pass to the component.}
}
\description{
\url{https://api.reactrouter.com/v7/functions/react-router.useViewTransitionState.html}
}
\details{
Calls the \code{useViewTransitionState()} hook and injects the boolean
result \code{as} a prop of the \code{into} component. Returns \code{TRUE}
while a View Transitions API navigation toward \code{to} is in progress.
Pair with the \code{viewTransition} prop on \code{\link{Link}}/\code{\link{NavLink}}
to drive transition-aware styling.
}
