Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 556 Bytes

README.md

File metadata and controls

29 lines (18 loc) · 556 Bytes

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)