> ## 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.

<Note>
  This is the **React InstantSearch v7** documentation.
  If you're upgrading from v6, see the [upgrade guide](/doc/guides/building-search-ui/upgrade-guides/react/#migrate-from-react-instantsearch-v6-to-react-instantsearch-v7).
  If you were using React InstantSearch Hooks,
  this v7 documentation applies—just check for [necessary changes](/doc/guides/building-search-ui/upgrade-guides/react/#migrate-from-react-instantsearch-hooks-to-react-instantsearch-v7).
  To continue using v6, you can find the [archived documentation](https://algolia.com/old-docs/deprecated/instantsearch/react/v6/api-reference/instantsearch/).
</Note>

```js Signature theme={"system"}
const stateMapping = simple();
```

## Import

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

## About this function

This `simple` state mapping is the default for the `<InstantSearch>` component's [routing](/doc/api-reference/widgets/instantsearch/react#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/react).

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";

const stateMapping = simple();

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

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

## Examples

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

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

function App() {
  return (
    <InstantSearch
      searchClient={searchClient}
      indexName="instant_search"
      routing={routing}
    >
      {/* ... */}
    </InstantSearch>
  );
}
```
