Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/allevo/seqflow-js

Fresh javascript framework for Frontend
https://github.com/allevo/seqflow-js

front-end-development frontend frontend-framework

Last synced: 13 days ago
JSON representation

Fresh javascript framework for Frontend

Awesome Lists containing this project

README

        

# SeqFlow JS

SeqFlowJS is a JavaScript library for creating and managing frontend workflows. The core ideas are:
- Events over State Management
- Simplicity over Complexity
- Linearity over Complex Abstractions
- Explicitness over Implicitiveness

See the [documentation](https://seqflow.dev) for more information.

## Installation

```bash
pnpm install seqflow-js
```

## Usage

```tsx
import { SeqflowFunctionContext } from "seqflow-js";

interface Quote {
author: string;
content: string;
}

async function getRandomQuote(): Promise {
const res = await fetch("https://api.quotable.io/random")
return await res.json();
}

export async function Main(this: SeqflowFunctionContext) {
// Render loading message
this.renderSync(

Loading...


);

// Perform an async operation
const quote = await getRandomQuote();

// Replace loading message with quote
this.renderSync(


{quote.content}

{quote.author}


);
}

start(document.getElementById("root"), Main, undefined, {});
```