Platform
Resources
Pricing
Sign in
Get started
Tom MacWright
hi!
Workspace
Fork
Published
By
Tom MacWright
Edited
Apr 10, 2019
1 fork
18 stars
Insert cell
Insert cell
// This 'r' method is like 'require', but it will
// know how to require the correct file from React’s publish module.
r
=
require
.
alias
(
{
react
:
"react@16/umd/react.production.min.js"
,
"react-dom"
:
"react-dom@16/umd/react-dom.production.min.js"
}
)
Insert cell
Insert cell
React
=
r
(
'react'
)
Insert cell
ReactDOM
=
r
(
'react-dom'
)
Insert cell
Insert cell
{
let
parent
=
html
`<div>`
;
ReactDOM
.
render
(
React
.
createElement
(
'div'
,
{
}
,
'Hello, world!'
)
,
parent
)
;
return
parent
;
}
Insert cell
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
r
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
React
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
ReactDOM
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML