You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have been recently using the leptos framework, and very much enjoying it, however I have a problem.
I have a table and a websocket. Each websocket message will refer to a specific table row to update. So I have a message signal, created by using the use_websocket function from leptos-use. And I have my vector of write signals representing the table values. I need some sort of derived signal from the message signal, which will set the appropriate write signal. For this I was thinking about using create_effect, but you are not meant to be setting signals using that method. I thought that if I created a derived signal for each row, that would also be inefficient (even with memo), as it would run the function for every table row. Basically I need a way to "demultiplex" a signal to multiple signals.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I have been recently using the
leptos
framework, and very much enjoying it, however I have a problem.I have a table and a websocket. Each websocket message will refer to a specific table row to update. So I have a
message
signal, created by using theuse_websocket
function fromleptos-use
. And I have my vector of write signals representing the table values. I need some sort of derived signal from themessage
signal, which will set the appropriate write signal. For this I was thinking about usingcreate_effect
, but you are not meant to be setting signals using that method. I thought that if I created a derived signal for each row, that would also be inefficient (even withmemo
), as it would run the function for every table row. Basically I need a way to "demultiplex" a signal to multiple signals.Any ideas about a good solution for this?
Thanks, Jem
Beta Was this translation helpful? Give feedback.
All reactions