Published
Edited
Dec 4, 2020
Importers
4 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
ViewofTest = ({ updateView }) => {
const [value, setValue] = useState('viewof approach');
useEffect(() => {
updateView(value);
}, [value]);
return h`
<input type="text" onInput=${(e) => setValue(e.target.value)} value=${value} />
`;
}
Insert cell
Insert cell
viewof testViewof = render((updateView) => h`<${ViewofTest} updateView=${updateView} />`);
Insert cell
testViewof
Insert cell
Insert cell
MutableTest = () => {
const [value, setValue] = useState('mutable approach');
useEffect(() => {
mutable mutableTest = value;
}, [value]);
return h`
<input type="text" onInput=${(e) => setValue(e.target.value)} value=${value} />
`;
}
Insert cell
render(h`<${MutableTest} />`);
Insert cell
mutable mutableTest = null;
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more