You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
Using raw HTML in Yew is not so simple but thankfully the inner_html example provides a decent solution.
However, this doesn't work with SSR as the web_sys/gloo packages are not available in that context.
So, how can raw HTML be used with SSR?
Steps To Reproduce
Steps to reproduce the behavior:
Use the inner_html example
Switch to the SSR renderer
Doesn't work
Expected behavior
The inner_html example was a workaround anyway so it would be good if there was an official way to handle raw HTML which also works with SSR.
Environment:
Yew version: master
Target, if relevant: any non-WASM target
Build tool, if relevant: trunk
Questionnaire
I'm interested in fixing this myself but don't know where to start
I would like to fix and I have a solution
I don't have time to fix this right now, but maybe later
The text was updated successfully, but these errors were encountered:
If you don't need the content in the inner html to be indexed by a search engine, you can delay the rendering logic that uses Web APIs with a use_effect hook so they are excluded from the server-side rendering process.
Cool, it seems like that's exactly what we need :)
If you don't need the content in the inner html to be indexed by a search engine, you can delay the rendering logic that uses Web APIs with a use_effect hook so they are excluded from the server-side rendering process.
Problem
Using raw HTML in Yew is not so simple but thankfully the inner_html example provides a decent solution.
However, this doesn't work with SSR as the
web_sys
/gloo
packages are not available in that context.So, how can raw HTML be used with SSR?
Steps To Reproduce
Steps to reproduce the behavior:
inner_html
exampleExpected behavior
The
inner_html
example was a workaround anyway so it would be good if there was an official way to handle raw HTML which also works with SSR.Environment:
Questionnaire
The text was updated successfully, but these errors were encountered: