March 2019
Intermediate to advanced
208 pages
5h 11m
English
The index.html file has two <div> elements with id attributes. The Index.re file renders (displays) the components in those <div>s.
| | <!DOCTYPE html> |
| | <html lang="en"> |
| | <head> |
| | <meta charset="UTF-8"> |
| | <title>ReasonReact Examples</title> |
| | </head> |
| | <body> |
| | Component 1: |
| | <div id="index1"></div> |
| | |
| | Component 2: |
| | <div id="index2"></div> |
| | |
| | <script src="Index.js"></script> |
| | </body> |
| | </html> |
| | ReactDOMRe.renderToElementWithId(<Component1 message="Hello! |
| | Click this text." />, "index1"); |
| | |
| | ReactDOMRe.renderToElementWithId(<Component2 greeting="Hello!" |
| | />, "index2"); |
What’s this code <Component1 ...
Read now
Unlock full access