Skip to content

Render should support plain text #4

@libasoles

Description

@libasoles

The render method accepts jsx, and something like text nodes, but plain text should be supported too. Otherwise it's neccesary to wrap text (or numbers) inside tags, like:

render(<>Hi</>, target);

And that's cumbersome.

See this working with React here:

https://playcode.io/react/

Paste these lines:

import { render } from 'react-dom';

render("Hi", document.querySelector('#app'));
```javascript

Works with numbers too:

`render(55, document.querySelector('#app'));`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions