Skip to content

Commit 0ea486c

Browse files
committed
Small tweeks to rendering-elements
1 parent 0ced4e9 commit 0ea486c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pages/docs/react/latest/rendering-elements.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,13 @@ wrapChildren(<div> React.string("Let's use React with ReScript") </div>)
4040

4141
Understanding the definition of a `React.element` is essential since it is heavily used within the React APIs, such as `ReactDOM.render(element, ...)`, etc. Be aware that JSX doesn't do any automatic `string` to `React.element` conversion for you (ReScript forces explicit type conversion). For example `<div> Hello World </div>` will not type-check (which is actually a good thing because it's also a huge source for subtle bugs!), you need to convert your `"Hello World"` with the `React.string` function first.
4242

43-
Our React bindings
44-
43+
Fortunately our React bindings bring all necessary functionality to represent all relevant data types as `React.element`s.
4544

4645
## Creating Elements
4746

4847
### Creating Elements from `string`, `int`, `float`, `array`
4948

50-
Apart from using JSX to create our React elements or React components (described later), the `React` module offers various functions to create elements from primitive data types:
49+
Apart from using JSX to create our React elements or React components, the `React` module offers various functions to create elements from primitive data types:
5150

5251
```res
5352
React.string("Hello") // new element representing "Hello"

0 commit comments

Comments
 (0)