I've installed Mitosis on my Node.js project, create the directory build for output files and create the input file component.jsx with the code from the link https://github.com/builderio/mitosis#at-a-glance
If I run the command
mitosis compile -t react --out=build/myCustomName.js component.jsx
everything works fine.
But when I paste the JSX code into the left column of their live compiler by the link https://mitosis.builder.io, compile it to JSON, then copy-paste the output JSON code into the file component.json and run the command
mitosis compile -t react -f builder --out=build/myCustomName.js component.json
I receive the file myCustomName.js with the following code only
import { useContext } from "react";
export default function MyComponent(props) {
return <></>;
}
Why? And how to resolve the issue?
ps. as I understand input format builder means their JSON, right?
Ok, now I see that the input format builder is also JSON, but it's not the same than JSON output format at the mitosis.builder.io. The issue is resolved.