Skip to content

Conversation

aevstratov
Copy link

Recently i ran into an issue with displaying a table with resource data. I do basic flow in markup like: {#if someResource.loading}...{:else if someResource.error}...{:else}<!-- working with resource data -->{/if}. And when i try to display date like <td>{formatter.format(someResource.current!.user.created_at)}</td>, i get an error saying that i am trying to display data that is undefined. After some time of debugging i found line with loading definition that is just let loading = $state(false). So this is the reason i got that error. It first tries to render block that i assume has a valid data, then starts handling loaderFn. I think it would be nice to set initial loading state that depends on params (check whether params have initial data or not + check "lazy" field).

Copy link

changeset-bot bot commented Sep 26, 2025

⚠️ No Changeset found

Latest commit: 8910773

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

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.

1 participant