image
Akan.js
English
Docs (V1)
image
Akan.js
You are viewing the Akan.js v1 docs.Go to the latest v2 docs
Docs (V1)
Released under the MIT License
Official Akan.js Consulting onAkansoft
Copyright © 2026 Akan.js All rights reserved.
System managed bybassman
Introduction
• Quick Start
• How it works
• Practice a Workflow
Tutorials
• Show Details
• Modifying Status
• Interact in Service
• Displaying with Slice
• UX with Pages
• Using Scalar
• Using Insight
• Relate Data
System Architecture
• Overview
• Backend System
• Frontend System
• Environment Variables
• Primitive Scalar Types
• Domain Based Modules
• CSS
Module Convention
• Overview
• model.constant.ts
• model.dictionary.ts
• model.document.ts
• model.service.ts
• model.signal.ts
• model.store.ts
• Model.Template.tsx
• Model.Unit.tsx
• Model.Util.tsx
• Model.View.tsx
• Model.Zone.tsx
Scalar Convention
• Overview
• scalar.constant.ts
• scalar.dictionary.ts
• scalar.document.ts
Introduction
• Quick Start
• How it works
• Practice a Workflow
Tutorials
• Show Details
• Modifying Status
• Interact in Service
• Displaying with Slice
• UX with Pages
• Using Scalar
• Using Insight
• Relate Data
System Architecture
• Overview
• Backend System
• Frontend System
• Environment Variables
• Primitive Scalar Types
• Domain Based Modules
• CSS
Module Convention
• Overview
• model.constant.ts
• model.dictionary.ts
• model.document.ts
• model.service.ts
• model.signal.ts
• model.store.ts
• Model.Template.tsx
• Model.Unit.tsx
• Model.Util.tsx
• Model.View.tsx
• Model.Zone.tsx
Scalar Convention
• Overview
• scalar.constant.ts
• scalar.dictionary.ts
• scalar.document.ts
Previous
Model.Util.tsx
Next
Model.Zone.tsx

Model.View.tsx

Model.View.tsx files are specialized server components dedicated to the comprehensive presentation of proper models (Full Models). Unlike Units which display summaries (Light Models), Views are responsible for rendering the full detail of a domain entity, often serving as the main content for detail pages.
💎Full Detail
Views have access to all properties of a model, including heavy fields like content bodies, detailed arrays, or sensitive data not present in Light Models.
View vs Unit: Understanding the Difference
It is crucial to distinguish between View and Unit components to maintain a clean architecture and optimal performance.
ComparisonDescriptionExample
Model.ViewRenders the Full Model (cnst.Model). Used for main pages.
Model.UnitRenders the Light Model (cnst.LightModel). Used for lists/cards.
Model.View

Renders the Full Model (cnst.Model). Used for main pages.

Model.Unit

Renders the Light Model (cnst.LightModel). Used for lists/cards.

File Location

File Structure

Implementation

Views typically export a 'General' component and other specialized layouts. They receive the full Model types defined in your constants.
1. Interface Definition
Define props using the Full Model type (e.g., cnst.Product, not cnst.LightProduct).
2. General Component

Usage in Detail Pages

Views are designed to be served in dynamic routes (e.g., [id]/page.tsx) where the full model is fetched.
Using Load.Page
For optimal performance and clean handling of async data, use the `Load.Page` utility.
app/[lang]/shop/product/[productId]/page.tsx

Load.View

When using Views within Client Components (like Zones or Tab layouts), simply passing props can lead to hydration mismatches. The `Load.View` utility solves this by safely hydrating the model state into the store.
Pattern: Zone.View Wrapper
Define a specialized Zone component that takes a `ClientView` object and renders your View using `Load.View`.
lib/product/Product.Zone.tsx

Composition Strategy

Ideally, a View should not contain complex logic or huge amounts of code. Its main job is to assemble smaller pieces—Units (data), Utilities (actions), and Zones (layouts)—into a complete page.
View (Parent)
Layouts, Structural grids, Headings
⬇️
Children
  • Unit: Sub-items, lists within the view
  • Util: Interactive buttons (Like, Share)
  • Zone: Complex subsections (Comments)
Model.View.tsx
View vs Unit
File Location
Implementation
Usage in Detail Pages
Load.View
Composition Strategy