
Product
Socket Now Protects the Firefox Extension Ecosystem
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.
@foldkit/core
Advanced tools
⚠️ Experimental: Foldkit is in canary release for early adopters and experimenters. APIs are incomplete and may change rapidly.
Foldkit is an Elm-inspired UI framework powered by Effect.
Like origami: simple parts become intricate when folded together.
Foldkit applies functional programming principles to UI development:
(model: Model, message: Message): Model is the only way to change state.Command<Message> values and executed by the runtime, not performed directly in update functions.npm install @foldkit/core effect
See the full example at examples/counter/src/main.ts
import { Effect, Schema } from 'effect'
import { Fold, Runtime } from '@foldkit/core'
import { Class, Html, OnClick, button, div } from '@foldkit/html'
import { ST, ts } from '@foldkit/schema'
// MODEL
const Model = Schema.Number
type Model = ST<typeof Model>
// MESSAGE
const Decrement = ts('Decrement')
const Increment = ts('Increment')
const Reset = ts('Reset')
const Message = Schema.Union(Decrement, Increment, Reset)
type Decrement = ST<typeof Decrement>
type Increment = ST<typeof Increment>
type Reset = ST<typeof Reset>
type Message = ST<typeof Message>
// UPDATE
const update = Fold.fold<Model, Message>({
Decrement: (count) => [count - 1, []],
Increment: (count) => [count + 1, []],
Reset: () => [0, []],
})
// INIT
const init: Runtime.ElementInit<Model, Message> = () => [0, []]
// VIEW
const view = (count: Model): Html =>
div(
[Class('min-h-screen bg-white flex flex-col items-center justify-center gap-6 p-6')],
[
div([Class('text-6xl font-bold text-gray-800')], [count.toString()]),
div(
[Class('flex flex-wrap justify-center gap-4')],
[
button([OnClick(Decrement.make()), Class(buttonStyle)], ['-']),
button([OnClick(Reset.make()), Class(buttonStyle)], ['Reset']),
button([OnClick(Increment.make()), Class(buttonStyle)], ['+']),
],
),
],
)
// STYLE
const buttonStyle = 'bg-black text-white hover:bg-gray-700 px-4 py-2 transition'
// RUN
const element = Runtime.makeElement({
Model,
init,
update,
view,
container: document.getElementById('root')!,
})
Effect.runFork(element)
Explore the examples locally:
git clone https://github.com/devinjameson/foldkit.git
cd foldkit
pnpm install
# In one terminal - build Foldkit in watch mode
pnpm dev:core
# In another terminal - run the counter example
pnpm dev:example:counter
We're building in the open. Feedback, issues, and contributions are welcome.
MIT
FAQs
Elm-inspired UI framework powered by Effect
The npm package @foldkit/core receives a total of 0 weekly downloads. As such, @foldkit/core popularity was classified as not popular.
We found that @foldkit/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.

Research
/Security News
Three compromised Rust crates pulled in a malicious dependency that downloaded and executed cross-platform malware during Cargo builds.

Research
/Security News
Socket uncovered 77 linked Firefox extensions, including 40 that steal wallet secrets or credentials and 37 deceptive sports-score shells.