Overview
The Actions Library in Clutch provides a set of prebuilt client-side navigation utilities designed for use in forms and interactive components. These actions integrate with Clutch's router to handle navigation and routing behavior in a streamlined way.
navigate:
Navigates to a new route, adding it to the browser's history stack. Accepts either a string or an object with url
and params
.
replace:
Navigates to a new route but replaces the current history entry instead of pushing a new one.
goBack:
Moves back one step in the browser's history.
goForward:
Moves forward one step in the browser's history.
refresh:
Refreshes the current route, re-fetching data and server components while preserving client state and scroll position.