New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

seqflow-js

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seqflow-js - npm Package Compare versions

Comparing version 0.0.1-beta.10 to 0.0.1-beta.11

2

package.json
{
"name": "seqflow-js",
"version": "0.0.1-beta.10",
"version": "0.0.1-beta.11",
"description": "SeqFlow is a modern web framework that is designed to be simple and easy to use. It optimizes the development process by providing a simple and easy-to-understand API. It is a good choice for those who want to create web applications without the complexity of other frameworks.",

@@ -5,0 +5,0 @@ "main": "./dist/index.mjs",

@@ -18,36 +18,33 @@ # SeqFlow JS

```tsx
import { start, SeqflowFunctionContext } from 'seqflow-js'
import { SeqflowFunctionContext } from "seqflow-js";
async function Main(this: SeqflowFunctionContext) {
let counter = 0
interface Quote {
author: string;
content: string;
}
const decrementButton = <button type="button">Decrement</button>
const incrementButton = <button type="button">Increment</button>
const counterDiv = <div>{counter}</div>
this.renderSync(
<>
<div>
{decrementButton}
{incrementButton}
</div>
{counterDiv}
</>
)
async function getRandomQuote(): Promise<Quote> {
const res = await fetch("https://api.quotable.io/random")
return await res.json();
}
const events = this.waitEvents(
this.domEvent('click', { el: this._el })
)
for await (const ev of events) {
if (ev.target === incrementButton) {
counter++
} else if (ev.target === decrementButton) {
counter--
}
export async function Main(this: SeqflowFunctionContext) {
// Render loading message
this.renderSync(
<p>Loading...</p>
);
counterDiv.textContent = `${counter}`
}
// Async operation may fail
const quote = quote = await getRandomQuote();
// Replace loading message with quote
this.renderSync(
<div>
<div>{quote.content}</div>
<div>{quote.author}</div>
</div>
);
}
start(document.getElementById('root')!, Main)
start(document.getElementById("root"), Main, undefined, {});
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc