Published
Edited
Apr 7, 2020
Insert cell
Insert cell
function DayDisplayer() {
const [day, setDay] = useState("Saturday")
return jsx`<div>
<h4>It is ${day}</h4>
</div>`;
}
Insert cell
function Schedule() {
const [day, setDay] = useState("Saturday")
return jsx`<p>${day == "Saturday" ? "Relax" : "Do not relax"}</p>`;
}
Insert cell
function App() {
return jsx`<div>
<${DayDisplayer} />
<${Schedule} />
</div>`;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function NameInput() {

return jsx`<input type="text" />`;
}
Insert cell
function NameDisplay() {

return jsx`<p></p>`;
}
Insert cell
function ParentComponent() {
const setName = (e) => { };
return jsx`<div></div>`;
}
Insert cell
Insert cell
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.
Learn more