Skip to content

difference between with_custom_head and render link #1886

Answered by ealmloff
kzhui125 asked this question in Q&A
Discussion options

You must be logged in to vote

In dioxus, you components all render into the <body> element which contains the content of the page. <link> elements should be placed in the <head> element instead which contains some metadata/resources for the page. The first code snippet correctly places it in the head, the second code snippet will place the link somewhere in the body

Some relevant discussions:

  • Modifying the head in a cross platform way potentially with rsx #1169
  • Linking assets in rust code at compile time #1283

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kzhui125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants