mitosis
mitosis copied to clipboard
Write components once, run everywhere. Compiles to React, Vue, Qwik, Solid, Angular, Svelte, and more.
Originally from https://github.com/BuilderIO/mitosis/issues/372#issuecomment-1150135164 For this input: ```tsx import { HTMLAttributes } from "react"; export const headingSizes = [1, 2, 3, 4, 5, 6]; export interface HeadingProps extends HTMLAttributes { size:...
### Currently As with other output, the Angular output passes in-line event handling code through. For example, this input: ``` (state.list = [...state.list, state.newItemName])} > ``` Produces this output: ```...
If we add the same Props types to these two snapshots: https://github.com/BuilderIO/mitosis/blob/da3e2671f5d76bf3a002ebee4f397493d3ea6996/packages/core/src/__tests__/data/basic-props-destructure.raw.tsx#L4 https://github.com/BuilderIO/mitosis/blob/da3e2671f5d76bf3a002ebee4f397493d3ea6996/packages/core/src/__tests__/data/basic-props.raw.tsx#L4 ```ts type Props = { children: any; type: string } ``` Then the `parser-jsx` test will fail...
https://github.com/BuilderIO/mitosis/blob/7b5d4c9396c975b3af5ab83734622347cd546862/packages/core/src/parsers/jsx.ts#L1009 We are hitting this warning in our snapshot tests for React when running for this snapshot: https://github.com/BuilderIO/mitosis/blob/7b5d4c9396c975b3af5ab83734622347cd546862/packages/core/src/__tests__/data/basic-ref-usePrevious.raw.tsx#L7 Looking at the logic: https://github.com/BuilderIO/mitosis/blob/7b5d4c9396c975b3af5ab83734622347cd546862/packages/core/src/parsers/jsx.ts#L982-L1010 This is not accounting for `node.declaration` being...
Instead of hardcoding mitosis versions in Fiddle, we should have a dropdown that dynamically fetches all (or the last 10-15) versions of the `core` package, and allow the user to...
### Feature request... Angular has `[class:foo]="bar"` Svelte has `class:foo={bar}` Solid isn't too far behind, with: `classList={{ active: state.active, editing: state.currentId === row.id }}` Mitosis has a CSS-in-JS construct, but conditional...
* We need a test to fail when we add new features or change the way the parser works that may break it * We need some documentation on how...
It would be great to integrate Mitosis with Storybook to have a great development environment for viewing components, and ideally be able to preview components across outputs to make sure...
we need a way to assign `props` to `state` https://github.com/BuilderIO/mitosis/blob/main/docs/gotchas.md#cant-assign-params-to-state we can either inject the workaround into onMount or for some generators
in most of the generated code this works as expected. https://github.com/BuilderIO/mitosis/blob/main/docs/gotchas.md#functions-cant-be-passed-by-reference-to-jsx-callbacks