> For the complete documentation index, see [llms.txt](https://angkira.gitbook.io/foxstore/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://angkira.gitbook.io/foxstore/base-concepts.md).

# Base concepts

Concept of entities which Foxstore is based on.

### Event

```typescript
/**
 * Atomaric data-unit, that may contain info
 *
 * @export
 * @class Event
 */
export declare class FoxEvent<Payload = unknown> {
    name: string | symbol;
    payload?: Payload | Observable<Payload> | Promise<Payload> | undefined;
    constructor(name: string | symbol, payload?: Payload | Observable<Payload> | Promise<Payload> | undefined);
}
```

Event is minimal data-wrapper that can be sent through eventbus named Dispatcher.  Simply, it is a pair of key - name - and value - payload.&#x20;

### Dispatcher

```typescript
/**
 * Simple Event-manager
 *
 * @export
 * @class Dispatcher
 */
export declare class Dispatcher {
    constructor(initEvent?: FoxEvent, scheduler?: SchedulerLike);
    dispatch(event: FoxEvent): void;
    listen(...eventNames: (string | symbol)[]): Observable<FoxEvent>;
    emitDestroy(): void;
    get destroy$(): Observable<FoxEvent<unknown>>;
}
```

Dispatcher is simple event manager that can dispatch and listen events. Dispatcher is eventbus that can be shared between different modules or any other entities in your app.
