question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow returning string (unsafe) from render

See original GitHub issue

I would like to be able to return a string (unsafe) from a server render without having to sanitize with the html export, perhaps this could be an opt-in config option?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:39 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
brilloutcommented, Jun 17, 2021

Released in 0.1.2.

See html._injectAssets() and pageContext._pageAssetsin https://github.com/brillout/vite-plugin-ssr/tree/master/examples/custom-server-render-integration.

I added the prefix _ to communicate that these are non-documented beta features subject to breaking changes. For now you are the only one using them and I’ll let you know if there is a breaking change.

After a while we will remove the prefix and add documentation.

1reaction
brilloutcommented, Jun 16, 2021

Yea I’ve done a pretty deep internal refactor which I’ve been wanting to do for quite some time. The neat thing here is that everything revolves around pageContext now internally as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to safely render user-provided HTML string in React
It means that this method is safe to use only if html was generated by your code and not provided by a 3rd-party...
Read more >
How to render HTML string as real HTML? - Stack Overflow
Appreciate the mention @KunalParekh, but they're different things. My answer is only valid if the html is located within your app (meaning it's...
Read more >
How to Render HTML in State String | Pluralsight
In React, a state is an object that is used to store various values, such as a string, number, object, array, or HTML....
Read more >
Renderers - DataTables
These functions must return a function that will operate with the columns.render method. Consider for example the following simple plug-in that will truncate ......
Read more >
Template Syntax | Vue.js
Vue uses an HTML-based template syntax that allows you to declaratively bind the rendered DOM to the underlying component instance's data.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found