> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# simple

> Default mapping between InstantSearch state and the URL.

<div className="not-prose algolia-flavor-switcher">
  <div className="afs-dropdown">
    <div className="afs-trigger" role="button" tabIndex="0" aria-haspopup="listbox">
      <span className="afs-current">Vue</span>

      <svg className="afs-chevron lucide lucide-chevron-down" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
        <path d="m6 9 6 6 6-6" />
      </svg>
    </div>

    <ul className="afs-menu" role="listbox">
      <li role="option" aria-selected="false"><a className="afs-option" href="/doc/api-reference/widgets/simple-state-mapping/js"><span className="afs-option-name">JavaScript</span><span className="afs-option-lib">InstantSearch.js</span></a></li>
      <li role="option" aria-selected="false"><a className="afs-option" href="/doc/api-reference/widgets/simple-state-mapping/react"><span className="afs-option-name">React</span><span className="afs-option-lib">React InstantSearch</span></a></li>
      <li role="option" aria-selected="true"><a className="afs-option is-current" href="/doc/api-reference/widgets/simple-state-mapping/vue"><span className="afs-option-name">Vue</span><span className="afs-option-lib">Vue InstantSearch</span></a></li>
    </ul>
  </div>
</div>

```js Signature theme={"system"}
import { simple } from "instantsearch.js/es/lib/stateMappings";

const routing = {
  stateMapping: simple(),
};
```

## About this widget

This `simple` state mapping is the default for the `ais-instant-search` wrapper's
[routing](/doc/api-reference/widgets/instantsearch/vue#param-routing) prop.

The router provides an API that lets you customize some of its behaviors.
For more information, see [Routing URLs](/doc/guides/building-search-ui/going-further/routing-urls/vue).

The only transformation applied by the function is the omission of `configure`.

```js JavaScript icon=code theme={"system"}
import { simple } from "instantsearch.js/es/lib/stateMappings";

simple().stateToRoute({
  instant_search: {
    query: "Apple",
    page: 5,
    configure: {
      hitsPerPage: 4,
    },
  },
});

// gives as output:
// {
//   instant_search: {
//     query: 'Apple',
//     page: 5,
//   },
// }
```

## Examples

```vue Vue icon=code theme={"system"}
<template>
  <ais-instant-search [...] :routing="routing">
    <!-- Widgets -->
  </ais-instant-search>
</template>

<script>
import { simple } from "instantsearch.js/es/lib/stateMappings";

export default {
  data() {
    return {
      // ...
      routing: {
        stateMapping: simple(),
      },
    };
  },
};
</script>
```
