Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix createResource state for errored (typo) #1133

Merged
merged 3 commits into from
Mar 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/routes/reference/basic-reactivity/create-resource.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ const [user] = createResource(() => params.id, fetchUser, {
#### v1.5.0

1. We've added a new state field which covers a more detailed view of the Resource state beyond `loading` and `error`.
You can now check whether a Resource is `unresolved`, `pending`, `ready`, `refreshing`, or `error`.
You can now check whether a Resource is `unresolved`, `pending`, `ready`, `refreshing`, or `errored`.

| State | Value resolved | Loading | Has error |
| ------------ | -------------- | ------- | --------- |
| `unresolved` | No | No | No |
| `pending` | No | Yes | No |
| `ready` | Yes | No | No |
| `refreshing` | Yes | Yes | No |
| `error` | No | No | Yes |
| `errored` | No | No | Yes |

2. When server-rendering resources, especially when embedding Solid in other systems that fetch data before rendering, you might want to initialize the resource with this prefetched value instead of fetching again and having the resource serialize it in its own state.
You can use the new `ssrLoadFrom` option for this.
Expand Down