Skip to content
Discussion options

You must be logged in to vote

ErrorBoundary doesn't wrap values, it catches Err(_) that's rendered. In your example, you'd want something like

{move || identities_resource.with(|rt| rt.as_ref().map(|data| {
  data.iter().map(|id| view! { <Identity id=id /> })
})}

as you correctly noted, this particular approach is going to re-render everything every time the resource changes, so there's no real point in For here. If you want to use For you should read the resource in a memo and feed the memo into the each prop.

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@gbj
Comment options

gbj Aug 22, 2023
Maintainer

Answer selected by orthecreedence
@orthecreedence
Comment options

Comment options

You must be logged in to vote
2 replies
@gbj
Comment options

gbj Aug 23, 2023
Maintainer

@orthecreedence
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants