jsx2svelte Svelte Themes

Jsx2svelte

Compiles React JSX components to svelte components.

jsx2svelte

jsx2svelte is a Compiler that compiles React JSX components to svelte components.

Web Demo

Web Demo Repo

Installation

npm i jsx2svelte --save

Usage

import { compile } from 'jsx2svelte'

const jsxCode = `
  import React from 'react';

  export default ({ prop }) => {
    useEffect(() => { doSomething(); }, []);

    return <div>testing props</div>;
  };
`

const svelteCode = compile(jsxCode)

Top categories

Loading Svelte Themes