- Source:
Methods
(static) useRefreshData()
Refresh the current route and fetch new data from the server without losing client-side browser or React state.
Refresh the current route and fetch new data from the server without losing client-side browser or React state.
- Source:
Example
const { refresh } = useRefreshData();
const onSubmit = async (event) => {
// Some async operation doing something with the data
refresh() // refresh once it's done and there is new data
}