Skip to content

fix(yew-link): surface initial internal fetch errors instead of retrying indefinitely - #4219

Open
cuishuang wants to merge 2 commits into
yewstack:masterfrom
cuishuang:master
Open

fix(yew-link): surface initial internal fetch errors instead of retrying indefinitely#4219
cuishuang wants to merge 2 commits into
yewstack:masterfrom
cuishuang:master

Conversation

@cuishuang

@cuishuang cuishuang commented Sep 7, 2026

Copy link
Copy Markdown

Description

Fix the client-side use_linked_state retry loop caused by initial LinkError::Internal results not being cached.

Initial fetches now cache all completed results, including infrastructure errors. This allows the suspension to resolve and exposes the error through LinkedStateHandle::as_result() instead of creating another identical request.

Refresh behavior remains unchanged: LinkError::Internal results from background refreshes are not cached, so an existing stale value is preserved.

Fixes #4218

Checklist

  • I have reviewed my own code
  • I have added tests

…ing indefinitely

Signed-off-by: cuishuang <imcusg@gmail.com>
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit d19c797):

https://yew-rs-api--pr4219-master-68tx4rnl.web.app

(expires Mon, 14 Sep 2026 14:34:33 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Size Comparison

Details
examples master (KB) pull request (KB) diff (KB) diff (%)
async_clock 100.392 100.392 0 0.000%
boids 165.085 165.085 0 0.000%
communication_child_to_parent 93.856 93.856 0 0.000%
communication_grandchild_with_grandparent 106.241 106.241 0 0.000%
communication_grandparent_to_grandchild 102.563 102.563 0 0.000%
communication_parent_to_child 91.244 91.244 0 0.000%
contexts 106.551 106.551 0 0.000%
counter 86.417 86.417 0 0.000%
counter_functional 88.549 88.549 0 0.000%
dyn_create_destroy_apps 90.316 90.316 0 0.000%
file_upload 98.724 98.724 0 0.000%
function_delayed_input 94.864 94.864 0 0.000%
function_memory_game 168.840 168.840 0 0.000%
function_router 400.435 400.435 0 0.000%
function_todomvc 165.240 165.240 0 0.000%
futures 236.103 236.103 0 0.000%
game_of_life 100.787 100.787 0 0.000%
immutable 258.186 258.186 0 0.000%
inner_html 80.927 80.927 0 0.000%
js_callback 109.995 109.995 0 0.000%
keyed_list 176.485 176.485 0 0.000%
mount_point 84.341 84.341 0 0.000%
nested_list 112.891 112.891 0 0.000%
node_refs 91.923 91.923 0 0.000%
password_strength 1765.898 1765.898 0 0.000%
portals 93.743 93.743 0 0.000%
router 366.669 366.669 0 0.000%
suspense 114.180 114.180 0 0.000%
timer 88.663 88.663 0 0.000%
timer_functional 99.664 99.664 0 0.000%
todomvc 142.141 142.141 0 0.000%
two_apps 86.321 86.321 0 0.000%
web_worker_fib 136.737 136.737 0 0.000%
web_worker_prime 186.822 186.822 0 0.000%
webgl 83.073 83.073 0 0.000%

✅ None of the examples has changed their size significantly.

Comment thread packages/yew-link/src/lib.rs Outdated
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.

use_linked_state retries indefinitely after an initial LinkError::Internal

2 participants