domql
domql copied to clipboard
When root component doesn't have a `state` property, its children don't inherit it
const comparison = {
h1: {
tag: "h1",
text: "DOMQL -> Mitosis",
style: { textAlign: "center" },
},
dropdown,
container: {
domqlCodeBlock,
mitosisCodeBlock,
style: {
width: "100%",
display: "flex",
height: "100%",
flexDirection: "row",
justifyContent: "space-between",
}
},
state: { sentinel: "hi"}, // if this is not defined, dropdown.state is an empty object
style: {
height: "100%",
fontFamily: "monospace",
}
}
app = DOM.create(comparison, document.body, "app")
Let's double-check this with @2.x