Conversation
docs(storage): resource usage
🦋 Changeset detectedLatest commit: 348974b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
thetarnav
left a comment
There was a problem hiding this comment.
You really like using Object.assign for some reason.
I find it much harder to read and understand.
What's the idea behind it?
|
The idea is mostly about TS, because it lets you keep the original type information, which is impossible if you generate the tuple yourself. |
|
|
|
The problem with typecasting is that the generics can clash. It is very difficult to get around that, hence why I prefer Object.assign. |
docs(storage): resource usage
This simplifies the types considerably and corrects the documentation on how to use a persisted state with createResource.