Welcome to our new site! Please share feedback

Project structure

For a practical example of the below structure, check out our example project.

Here is how a Mitosis project will be structured:

  • src/ contains your Mitosis source code
  • output/ contains per-target output of the project
    • You will notice .lite.tsx files in your output. Those are a human-readable Mitosis components. Think of them as a reference point for you to debug more easily, since the actual JS output is minified and thus difficult to read.
  • mitosis.config.js contains general and per-target configuration. It is used by mitosis build.
  • overrides/ contains a per-target folder that mimicks the structure of src, and will completely swap out any files with identical names.
    • Example: if we have defined overrides/react-native/src/functions/is-react-native.ts, it will override src/functions/is-react-native.ts in output/react-native/src/functions/is-react-native.js.