Skip to content

Conversation

@atk
Copy link
Member

@atk atk commented Oct 27, 2025

docs(storage): resource usage

This simplifies the types considerably and corrects the documentation on how to use a persisted state with createResource.

docs(storage): resource usage
@changeset-bot
Copy link

changeset-bot bot commented Oct 27, 2025

🦋 Changeset detected

Latest commit: 348974b

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

This PR includes changesets to release 1 package
Name Type
@solid-primitives/storage Minor

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

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.

You really like using Object.assign for some reason.
I find it much harder to read and understand.
What's the idea behind it?

@atk
Copy link
Member Author

atk commented Oct 28, 2025

The idea is mostly about TS, because it lets you keep the original type information, which is impossible if you generate the tuple yourself.

@atk atk requested a review from thetarnav November 3, 2025 08:33
@thetarnav
Copy link
Member

Object.assign is the only part I'm questioning really. I would prefer typecasting as any. But if you're fine with it, I don't have other comments.

@atk
Copy link
Member Author

atk commented Nov 4, 2025

The problem with typecasting is that the generics can clash. It is very difficult to get around that, hence why I prefer Object.assign.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants