The goals of this project are:
- HTML-first templating
- No VDOM
- Implicit re-renders (instead of calling an update function manually, "mutate")
## Installation
```shell
npm install the-fun-framework
```
## Usage
```html
{{message}}
```
```typescript
// index.ts
import { createState, registerComponent, render } from "the-fun-framework";
function App() {
return {
message: "Hello, world",
};
}
// Register with the same name as `data-island-comp`
App.selector = "App";
registerComponent(App);
render();
```
### Conditional Display
```html
Count: {{count.value}}
{{count.value}} is even
```
```typescript
// index.ts
import { createState, registerComponent, render } from "the-fun-framework";
function Counter() {
let count = createState(0);
function updateCount() {
count.value++;
}
return {
count,
updateCount,
};
}
// Register with the same name as `data-island-comp`
Counter.selector = "Counter";
registerComponent(Counter);
render();
```
### Loop Display
```html