const client = new StatsigOnDeviceEvalClient('client-key');
await client.initializeAsync();
const dataAdapter = client.dataAdapter;
```python
[View full example on GitHub](https://github.com/statsig-io/js-client-monorepo/blob/main/samples/react/src/samples/on-device-eval-client/sample-on-device-get-data-adapter.tsx)
### Bootstrapping
Bootstrapping allows you to provide the required data without a network call. This can be useful if you do not wish to make network calls during startup.
If you are building a mobile app and want to bundle values with your application. Then you can load the values from a local file at startup and provide them to the data adapter.
```typescript
import { StatsigOnDeviceEvalClient } from '@statsig/js-on-device-eval-client';
const client = new StatsigOnDeviceEvalClient('client-key');
// Bootstrap with specs data from local file or bundle
const specsData = /* data from local file */;
await client.dataAdapter.setData(specsData);
await client.initializeAsync();
```python
[View full example on GitHub](https://github.com/statsig-io/js-client-monorepo/blob/main/samples/react/src/samples/on-device-eval-client/sample-on-device-bootstrap.tsx)
<Note>
You can get a copy of your current specs data by visiting: `https://api.statsigcdn.com/v1/download_config_specs/client-{YOUR_SDK_KEY}.json`
</Note>
### Custom Implementation
If you would like to customize when and how data is fetched, as well as where it is stored, you can create your own class the conforms to the `SpecsDataAdapter` type.
The `SpecsDataAdapter` type outlines the following functions:
- `attach` - Called when the `SpecsDataAdapter` is passed into a `StatsigOnDeviceEvalClient` via `StatsigOptions`. This allows the `SpecsDataAdapter` to use
the same SDK Key and `StatsigOptions` as the `StatsigOnDeviceEvalClient` instance.
- ```typescript
attach: (sdkKey: string, options: StatsigOptionsCommon | null) => void
```sql
- `getDataSync` - Synchronously get evaluation data for the given user. Called during initializeSync. It is also called during
async update operations before StatsigDataAdapter.getDataAsync is called.
- ```typescript
getDataSync: () => DataAdapterResult | null;
```text
- `getDataAsync` - Asynchronously get evaluation data for the given user. Called during initializeAsync.
- ```typescript
getDataAsync: (current: DataAdapterResult | null) => Promise<DataAdapterResult | null>;
```text
- `prefetchData` - Manually trigger a fetch for new specs data.
- ```typescript
prefetchData: () => Promise<void>;
```text
- `setData` - Manually set specs data.
- ```typescript
setData: (data: string) => Promise<void>;