Variables & Reactivity
All variables are reactive by default. No useState, no signals, no ceremony.
Basic Declaration
In FLIN, you declare variables without any keywords:
name = "Juste" // text (inferred)
count = 0 // int
price = 99.99 // float
active = true // bool
items = [] // empty list
💡 No
let, const, or varFLIN doesn't use declaration keywords. All variables are mutable and reactive by default.
Automatic Reactivity
When a variable changes, the UI updates automatically:
name = "World"
<input value={name} input={name = event.value} />
<p>Hello, {name}!</p>
When you type in the input, the paragraph updates instantly. No setState, no dispatch.
Type Annotations
Types are inferred, but you can be explicit:
score: float = 0
tags: [text] = []
user: User? = none // optional
point: (int, int) = (10, 20) // tuple
Built-in Types
| Type | Example | Description |
|---|---|---|
text |
"hello" |
UTF-8 string |
int |
42 |
64-bit integer |
float |
3.14 |
64-bit float |
bool |
true |
Boolean |
time |
now |
UTC timestamp |
[T] |
[1, 2, 3] |
List |
T? |
none |
Optional |
⚠ Important
FLIN uses text (not string), int (not integer), and none (not null or undefined).