# Remember a Vue filter with useRemember

> useRemember keeps a filter in the history entry. It is the wrong place for a password or a draft you must not lose.

- URL: https://laravel-vuejs.space/inertia-use-remember-vue
- Author: Anass Ez-zouaine (https://laravel-vuejs.space/author/anass-ez-zouaine)
- Published: 2026-10-11
- Topics: Laravel, VueJs, Inertia

People searching “Inertia useRemember” want a search box to keep its text when they open a post and press Back. The list itself should still come from Laravel. The [pagination guide](https://laravel-vuejs.space/laravel-vue-pagination) owns the links. This page is the local text.

> **TL;DR**
>
> -   useRemember keeps a filter in the history entry.
> -   It is the wrong place for a password or a draft you must not lose.
> -   Do not remember a password, a token, or a card number.
>
> **Who it's for:** Laravel + Vue developers on Inertia
>
> **Applies to:** Laravel 13 · Inertia 3 · Vue 3

## The fix

```vue
<script setup lang="ts">
import { useRemember } from "@inertiajs/vue3";

const filters = useRemember({ search: "" });
</script>

<template>
  <input v-model="filters.search" name="search" />
</template>
```

`useRemember` writes the object into the history state for this visit. Back restores it. A full reload does not. If the search must survive a reload, put `search` in the query string and read it from a prop.

## What to avoid

> **Gotcha**
>
> Do not remember a password, a token, or a card number. History state is not a vault, and the back button shows it again. A draft that must survive leaving the page belongs in [Pinia](https://laravel-vuejs.space/pinia-laravel-inertia) only if you accept that a reload still clears it. The server is the place for a draft you cannot lose.

## FAQ

**Q: How do I remember a Vue filter with useRemember?**

useRemember keeps a filter in the history entry. It is the wrong place for a password or a draft you must not lose.

**Q: What goes wrong with Inertia useRemember?**

Many developers want a search box to keep its text when they open a post and press Back. Do not remember a password, a token, or a card number.
