# Get started with the library

This guide will help you get started with the Evolu Library.

> Requirements: `TypeScript 5.7` or later with the `strict` flag enabled in
> `tsconfig.json` file.

## Installation

```bash
npm install @evolu/common
```

## Polyfills

Evolu uses [JavaScript explicit resource management](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Resource_management),
which Safari does not support yet, so call `installPolyfills` during app
startup before using Evolu.

```ts

installPolyfills();
```

For React Native apps, use `@evolu/react-native/polyfills` instead.

## Learning path

We recommend learning the Evolu Library in this order:

### 1. Array

Start with [`Array`](https://evolu.dev/docs/api-reference/common/Array), which provides helpers for improved type-safety and developer experience.

### 2. Result

Learn [`Result`](https://evolu.dev/docs/api-reference/common/Result/type-aliases/Result), a type-safe way to handle errors. It's the foundation for composable error handling.

### 3. Dependency injection

Explore [dependency injection](https://evolu.dev/docs/dependency-injection), the pattern Evolu uses to swap implementations and simplify testing.

### 4. Resource management

See [resource management](https://evolu.dev/docs/resource-management) — `using`, `DisposableStack`, and how it integrates with `Result`.

### 5. Task

Continue with [`Task`](https://evolu.dev/docs/api-reference/common/Task/type-aliases/Task) for JavaScript-native structured concurrency (promises that can be aborted, monitored, and more).

### 6. Type

Check the [`Type`](https://evolu.dev/docs/api-reference/common/Type) to enforce constraints at compile-time and validate data at runtime.

### 7. Conventions

Review the [Evolu conventions](https://evolu.dev/docs/conventions) to understand the codebase style and patterns.

## Exploring the API

After understanding the core concepts, explore the full API in the [API reference](https://evolu.dev/docs/api-reference/common). All code is commented, and tests are written to be read as examples—they demonstrate practical usage patterns and edge cases.