Replies: 1 comment 3 replies
-
|
Yes, |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Overview of my confusion
I saw in an issue that in Dioxus.toml, [web.resource.style] is deprecated. I can't find this in the Dioxus Configuration Documentation. I tried digging a bit into the code in the
mainbranch but I'm too much of a noobie to Rust to figure things out in a reasonable amount of time. Side note: here's the official documentation for Building User Interfaces > Styling - it too makes no mention ofDioxus.toml > [web.resource.(style|script)]- it explicitly states:Here's the issue that states that
Dioxus.toml > [web.resource.style]is deprecated: #3592 (comment)The thing is, either way, I'm truly baffled by the
[web.resource]property inDioxus.toml. On the surface, it feels self-explanatory but, when I try to use it, it doesn't work the way I expect.Expectations
Given:
in conjunction with
I would expect that setting the
Dioxus.toml > [web.resource.style]property would negate the need for declaring the following in a Component:Project Structure
Here's a sample dir structure:
Here is my
Dioxus.tomlfile:Conclusion
I'm pretty sure that I am misunderstanding the nature of
Dioxus.toml > [web.resource.(style|script)]. After spending 2 days trying to figure out why mystyles.css(the stylesheet I intend to be the primary entrypoint) wasn't loading, it was just by chance that I came across this guide: https://dioxuslabs.com/learn/0.7/guides/utilities/tailwind/ - which does not mention Dioxus.toml at all: instead, it specifies that stylesheets must be declared within the Component definition... which really does make sense in a React sort of way - and, is what I'm guessing is the project maintainers' intent.I'm opening this discussion because I want to be absolutely sure about two things:
Question 1
Is
Dioxus.toml > [web.resource.(style|script)]deprecated?Question 2
If not, what is it supposed to be used for and...
How is it supposed to be used?
Thank you for any/all assistance!
Beta Was this translation helpful? Give feedback.
All reactions