<Navigate .../>
Navigates to a new location from JSX. When rendered, it changes the URL to path and then renders its children (if any) at the destination. Useful for conditional redirects inside a Route tree.
# Attributes
| name | type | description |
|---|---|---|
| path | string | destination URL. Relative paths are resolved against the current location. |
| params? | key-value pairs object | replaces :name params in path for their URI-encoded values, same as A and Route. |
| replace? | boolean [false] | use history.replaceState so no new history entry is added. |
| scroll? | boolean | whether to scroll to the hash (if any) after navigating. |
| delay? | number | milliseconds to wait before navigating. Useful to show a message before redirecting. |
| children? | any | optional content rendered in place during the navigation (for example a "Redirecting…" notice when combined with delay). |
# Snippet
# Programmatic navigation
Outside JSX, import navigate from pota/use/location to navigate imperatively. It accepts the same options.