Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render should support plain text #4

Open
libasoles opened this issue Nov 8, 2021 · 0 comments
Open

Render should support plain text #4

libasoles opened this issue Nov 8, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@libasoles
Copy link

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'));`
@itsjavi itsjavi added the bug Something isn't working label Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants