# Rendering From String

If for any reason you don't want to use JSX, you can render component from string or template tag.

Rendering from string is extremely simple. The syntax is very similar to stateless components, but instead of returning JSX your function should return a string:

```javascript
const SuperHeader = ({ text }) => `
  <div>
    <h1>${text}</h1>
    <h3>It's Superpowered!</h3>
  </div>
`;
```

Your component function will have the `props` argument that you can use for interpolation (i.e. via ES6 template string).

*Note that string render doesn't support state and lifecycle methods.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://webcomp.gitbook.io/webcomp/rendering-from-string.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
