Skip to content

Add an @effect/atom-svelte package. #6486

Description

@thomasfosterau

What is the problem this feature would solve?

Currently there are @effect/atom-react, @effect/atom-solid, and @effect/atom-vue packages, but no equivalent for Svelte.

What is the feature you are proposing to solve the problem?

A new @effect/atom-svelte package which is analogous to the @effect/atom-react, @effect/atom-solid, and @effect/atom-vue packages.

The easiest implementation would be to use the createSubscriber function from svelte/reactivity, which was introduced in Svelte v5.7.0. This bypasses having to use Svelte 5's runes feature and appears to be intended for exactly this kind of integration. This would not require a .svelte.ts file, and could be implemented as plain TypeScript.

There may also be opportunities to integrate with Svelte's Context feature. Perhaps the createContext function?

What alternatives have you considered?

This would not be difficult to implement as a third party package, but obviously it would be preferable to have a first-party @effect/atom-svelte package.

Note: I previously opened a PR for an @effect/atom-svelte package in the Effect-TS/effect-smol repository before it way merged into this one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions