# Implement the Cart module
Read the Cart state from the InStore State module, and render a Cart that replaces the one built into the InStore POS.
This page describes the technical interface requirements for a Cart replacement. For the build setup that every replacement module needs, see [Build a replacement module](/instore/customization/pos-module-development.md).
A Cart replacement reads everything it needs from the Cart module context, rather than calling the InStore backend.
## Read Cart state and operations
Import `useCartModuleContext` from `instoreState/context/CartModuleContext` to read the Cart state and its operations.
`useCartModuleContext` returns a context object with the following public properties and methods. They are marked `@public` in the InStore State library TypeScript documentation and are supported for use in replacement modules.
| Member | Type | Description |
| --- | --- | --- |
| `cart` | `Cart \ | null` | Active Cart, or `null` when no Cart has been started. |
| `checkCartParameter` | Method | Checks whether a configuration parameter is available for this workstation. |
| `checkUserPermission` | Method | Checks whether the signed-in user holds a given permission. |
| `getCart` | Method | Loads a Cart by key and makes it the active Cart. |
| `isCheckoutAvailable` | `boolean` | Whether the Cart can go to checkout. `false` while a Cart action, such as adding an item, attaching a customer, or a queued barcode, is in flight. |
| `locale` | `string` | Active locale, such as `en-GB`. |
| `updateCart` | Method | Applies [Cart update actions](/api/projects/carts.md#update-actions) to a Cart. Accepts all Cart update actions. |
| `updateLineItemQty` | Method | Sets the quantity of a Line Item on a Cart. A quantity of `0` or less removes the Line Item. Always writes the `takeWith` fulfillment. Applying it to an ordered line converts the line to take-with. |
## Render a minimal Cart
Expose a root component that defines your routes:
```tsx title="src/App.tsx"
import React from 'react';
import { Route, Routes } from 'react-router-dom';
import { CartPage } from './components/CartPage';
const App = () => (
{t('Cart.line_items.no_items')}
; } return (