Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When root component doesn't have a state property, its children don't inherit it #137

Open
Nikaoto opened this issue Dec 1, 2022 · 1 comment

Comments

@Nikaoto
Copy link
Contributor

Nikaoto commented Dec 1, 2022

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")
@nikoloza
Copy link
Member

Let's double-check this with @2.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants