-
Notifications
You must be signed in to change notification settings - Fork 31
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
async_proxy example #30
Conversation
Looks great! Thank you for contributing.
After testing on my side, it looks like this line is crashing because it unwraps the value. Reason being the I think this is a great example! Good to have more complex code to reference, especially with net logic. If we can get all the |
I got to the same point. I don't know why it generates the |
Ah ok, I get it. |
There is still a defect which I don't understand: missing timezone when user pushes buttons for Mel, Adl, and Uto, then deletes Mel. The correspondence between the keys and Time objects is getting messed up. |
The smallest case is deleting the last item of any two. |
Yeah, a little tricky because the selector doesn't run when you'd expect it to. Maybe there is room for improvement here |
Try adding a unique |
Makes sense and has changed the result, but hasn't fixed it. When I get a moment, I'll try to repro it without yewdux. |
Make sure it's at top level. This seems to fix it for me, though maybe you're talking about a different issue. html! {
<tr key={timezone.clone()}>
<th> { timezone } </th>
<td> { datetime } </td>
<td> { format!("{:?}", status) } </td>
<td> <button onclick={refresh}> { "Refresh" } </button> </td>
<td> <button onclick={delete}> { "Delete" } </button> </td>
</tr>
} |
I'm still talking about the delete of last in list leaving missing timezone issue - video |
Oh yeah, I think I know what the issue is. Adjusting the selector like this should fix it: use_selector_with_deps(|state: &State, timezone| state.get(timezone), timezone); Basically the |
Bullseye! I need to read about that. This is probably good to go, but do you think the example would be clearer if I back out the unwrap handling, now they should be unreachable? |
No, I think it's fine. Happy to merge? |
This is good, even if they're unreachable in this example, it's nice to show how you would manage otherwise. Also helps others avoid the trap we fell into lol |
Too much? Also, delete doesn't work... Would love your thoughts, even if you don't want this for any reason. Happy to iterate it if there is something useful.