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'));`
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: