DioxusLabs / DioxusLabs/dioxus

Link asset never loaded If re-rendered too quickly

Open
#5,142 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

**Problem**

I ran into a possible race condition that keeps link assets from being loaded. Even though there are no errors in the web or local console.

I created a replication here https://github.com/mcmah309/dioxus_link_bug

Even if you attempt to make changes to the local css file that was never loaded in the first place, the console says the "file is being hot reloaded", but the file still does not exist in sources in chrome dev tools.

For my real world case that ran into the bug, there is actual async work inside the resource. But it happens with an empty resource as well.

Note: The title of the issue is "Link asset never loaded If re-rendered too quickly" but I have no idea if this is actually the reason for the bug, but it seems like the likely culprit.

**Steps To Reproduce**

Run the example above `dx serve --platform web`

**Expected behavior**

The background of the screen should be blue and asset `main1.css` should be loaded. But the asset is not loaded.

**Environment:**

- Dioxus version: 0.7.2
- Rust version: 1.93.0-nightly
- OS info: Linux
- App platform: web

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.