image
Akan.js
English
DocsConventionsReferencesCheatsheet
image
Akan.js
DocsConventionsReferencesCheatsheet
Released under the MIT License
Official Akan.js Consulting onAkansoft
Copyright © 2026 Akan.js All rights reserved.
System managed bybassman
General
• Authorization
• Schema Design
• Edge Computing
• File Management
• Single Sign-On
• DataList & Enum
Interface
• CRUD
• Endpoint
• Form
Observability
• Logging
• Dependency Injection
• Error Handling
• Metrics
Performance
• Caching
• Image Optimization
• Lazy Loading
• Querying
• Queueing
• Realtime
Development
• Documentation
• Script
• Docker
• Kubernetes
General
• Authorization
• Schema Design
• Edge Computing
• File Management
• Single Sign-On
• DataList & Enum
Interface
• CRUD
• Endpoint
• Form
Observability
• Logging
• Dependency Injection
• Error Handling
• Metrics
Performance
• Caching
• Image Optimization
• Lazy Loading
• Querying
• Queueing
• Realtime
Development
• Documentation
• Script
• Docker
• Kubernetes
Previous
Single Sign-On
Next
CRUD

DataList & Enum

Enum and DataList are small helpers you will see often in Akan. Enum is for a fixed set of values. DataList is for a list of items that each have an id.
  • Enum: status, role, type, category.
  • DataList: users, files, posts, selected rows.

Enum

Use Enum when the value must be one of a few known choices. This keeps forms, APIs, and labels consistent.
Fixed values
Use values in UI

DataList

Use DataList when you already loaded a list and want to update it by id. It is useful for UI state because you can add, replace, pick, and filter items easily.
  • `set(item)`: add or replace an item.
  • `pick(id)`: get one item by id.
  • `filter(fn)`: make a smaller DataList.
List by id

When To Use

  • Use Enum when the value is a kind of label: status, role, type, size, visibility.
  • Use DataList when the data is a collection of records with ids.
  • Do not use DataList as a database query. It is for data already loaded into the app.

Tips

  • Give enum names stable `refName`s because dictionaries and schemas can refer to them.
  • Keep DataList items small. It works best with light models used in lists.
  • Remember the shortcut: value choices are Enum, id collections are DataList.
DataList & Enum
Enum
DataList
When To Use
Tips