Skip to content

Comments

Add SSE primitive and transform utilities#831

Merged
davedbase merged 21 commits intosolidjs-community:mainfrom
davedbase:main
Feb 24, 2026
Merged

Add SSE primitive and transform utilities#831
davedbase merged 21 commits intosolidjs-community:mainfrom
davedbase:main

Conversation

@davedbase
Copy link
Member

This PR adds server-sent events to the Solid Primitives project. I developed this for a project and went a bit further with it by adding optional Worker and built-in transform utilities. The goal was to make the package composable and flexible for many uses. I rather like the idea of the transforms and might add that into the websocket package as well.

@davedbase davedbase requested review from atk and thetarnav February 21, 2026 18:53
@davedbase davedbase added the enhancement New feature or request label Feb 21, 2026
@changeset-bot
Copy link

changeset-bot bot commented Feb 21, 2026

🦋 Changeset detected

Latest commit: b8fe38f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 50 packages
Name Type
@solid-primitives/utils Minor
@solid-primitives/active-element Patch
@solid-primitives/audio Patch
@solid-primitives/autofocus Patch
@solid-primitives/bounds Patch
@solid-primitives/clipboard Patch
@solid-primitives/connectivity Patch
@solid-primitives/controlled-props Patch
@solid-primitives/cursor Patch
@solid-primitives/date Patch
@solid-primitives/destructure Patch
@solid-primitives/event-bus Patch
@solid-primitives/event-listener Patch
@solid-primitives/fullscreen Patch
@solid-primitives/geolocation Patch
@solid-primitives/graphql Patch
@solid-primitives/history Patch
@solid-primitives/immutable Patch
@solid-primitives/intersection-observer Patch
@solid-primitives/jsx-tokenizer Patch
@solid-primitives/keyboard Patch
@solid-primitives/masonry Patch
@solid-primitives/media Patch
@solid-primitives/memo Patch
@solid-primitives/mouse Patch
@solid-primitives/mutation-observer Patch
@solid-primitives/page-visibility Patch
@solid-primitives/pagination Patch
@solid-primitives/pointer Patch
@solid-primitives/presence Patch
@solid-primitives/promise Patch
@solid-primitives/props Patch
@solid-primitives/raf Patch
@solid-primitives/range Patch
@solid-primitives/refs Patch
@solid-primitives/resize-observer Patch
@solid-primitives/rootless Patch
@solid-primitives/signal-builders Patch
@solid-primitives/sse Patch
@solid-primitives/static-store Patch
@solid-primitives/storage Patch
@solid-primitives/stream Patch
@solid-primitives/styles Patch
@solid-primitives/trigger Patch
@solid-primitives/upload Patch
@solid-primitives/virtual Patch
@solid-primitives/scroll Patch
@solid-primitives/deep Patch
@solid-primitives/map Patch
@solid-primitives/set Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@davedbase davedbase added Primitive Proposal For discussing a primitive proposition and the API design and removed enhancement New feature or request labels Feb 21, 2026
@thetarnav
Copy link
Member

It would be nice to separate changing emails from proposing a new primitive.
Changing emails could be accepted immediately, while the primitive requires a better look.
btw to change the email on npm all packages need a patch release

@davedbase
Copy link
Member Author

It would be nice to separate changing emails from proposing a new primitive. Changing emails could be accepted immediately, while the primitive requires a better look. btw to change the email on npm all packages need a patch release

Yeah, I was thinking about that as I was changing it. I reverted it back and will issue a separate PR.

Copy link
Member

@thetarnav thetarnav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's interesting to include the "transforms" here
that aren't related strictly to sse, they are just normal functions
but are small enough that it's probably fine

@davedbase
Copy link
Member Author

it's interesting to include the "transforms" here
that aren't related strictly to sse, they are just normal functions
but are small enough that it's probably fine

I mean I can not include them or move them somewhere more central. Technically I believe websocket could leverage them.

Would it make sense to put them in utils?

@davedbase
Copy link
Member Author

@thetarnav resolved your comments and moved transforms to utils. I think they will be generally useful in other packages. Not just websocket and sse.

Copy link
Member

@thetarnav thetarnav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool
I think it looks good
how to document utils is a separate issue though

@davedbase
Copy link
Member Author

cool I think it looks good how to document utils is a separate issue though

Oh I added a simple section in the utils README for them. :)

@davedbase davedbase merged commit c5f7b49 into solidjs-community:main Feb 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Primitive Proposal For discussing a primitive proposition and the API design

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants