Pages
Introduction
Getting Started
Recipes
Reference
Literals
Arrays
Tuples
Type System
Functions
Modules
Records
Enums
Built-in Types
Constants
Equality
Stores
Routing
Comments
Control Expressions
Components
Properties
Computed Properties
Styling Elements
Connecting Stores
Using Providers
Internal State
Referencing Entities
Global Components
Lifecycle Functions
Directives
JavaScript Interop
Environment Variables
Packages
Format Directive
The
@format
directive returns the formatted string version of the code it's given and the
result of the code in a tuple
Tuple(a, String)
. This is created to make it easy to display a simple example of Mint code:
let {result, code} =
@format {
<div>
"Hello There!"
</div>
}
<div>
<{ result }>
<pre>
<code>
<{ code }>
</code>
</pre>
</div>