Skip to content

wasm.core::cell::panic_already_borrowed for reactive closure passed to child component rendered with <For> #2528

Answered by gbj
drakerossman asked this question in Q&A
Discussion options

You must be logged in to vote

A few observations:

I'm not sure why you say your code with the dummy signal is "unsound." Reading through it, this seems reasonable enough. It would be a bit cleaner to use a Trigger rather than the dummy signal.

That said, this isn't how I'd structure this application at all. Basically the state flow right now is that local storage is the state management, and any time you change anything, you write everything into local storage and then read it back out of local storage, and you do the reads and writes imperatively inside rendering code, which is kind of messy. The example doesn't really use signals at all to manage the data -- just this one dummy signal to handle the overall state upd…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@drakerossman
Comment options

@gbj
Comment options

gbj Jun 17, 2024
Maintainer

@drakerossman
Comment options

@gbj
Comment options

gbj Jun 18, 2024
Maintainer

Answer selected by drakerossman
@drakerossman
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