Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

core: add new fields to MitosisComponent type: slots

See original GitHub issue
export const createMitosisComponent = (
  options?: Partial<MitosisComponent>,
): MitosisComponent => ({
  '@type': '',
  imports: [],
  inputs: [],
  meta: {},
  state: {},
  children: [],
  hooks: {},
  context: { get: {}, set: {} },
  name: options?.name || 'MyComponent',
  subComponents: [],

a component needs to have all named slots available and I think it should be added here. and inside of children we need Slot nodes

'@type': '',
  slots: {
    mySelectorName: createMitosisComponent({})
  children: [
      name: 'Slot',
      properties: {
        name: 'mySelectorName'

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

sahilmobcommented, May 9, 2022

@steve8708 Sure thing. would love to add an eslint rule in the future 🚀 🚀 🚀

steve8708commented, May 9, 2022

great idea. only thing is this should probably be on right? aka when you have

<Layout slotFoo={<Bar />} />

it would become

      "@type": "",
      "name": "Layout",
      "meta": {},
      "properties": {},
      "slots": {
        "foo": { "@type": "", name: "Bar" ... }
      "children": []

this would be a great eslint rule to eventually add too (cc @sahilmob), essentially that

<div foo={<Jsx />} />

is not allowed, you can only put jsx expressions as binding values if the binding name starts with slot

Read more comments on GitHub >

github_iconTop Results From Across the Web

mitosis/ at main - GitHub
Write components once, run everywhere. Compiles to Vue, React, Solid, Angular, Svelte, and more. - mitosis/ at main · BuilderIO/mitosis.
Read more >
BIL 151 - Mechanisms of Mitosis - This is
In this project, you and your teammates will predict the outcome of treating a rapidly dividing tissue (onion root tip) with a substance...
Read more >
Lysosomal Changes in Mitosis - Cells - MDPI
When cells enter mitosis, most cellular processes that are not directly ... Mitotic cells decrease levels of lysosomal proteins, increase lysosome size, ...
Read more >
Mechanisms of Cellular Senescence: Cell Cycle Arrest and ...
Depending on the cell type and intensity and nature of the stress, ... complex also requires phosphorylation of the LIN52 component of the...
Read more >
Talking Drupal #353 - Native Web Components
Because you know, in core Drupal nine, Drupal eight, you can add a ... and slots where you're going to really kind of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found