jsx2svelte
v0.0.8
Published
Transpile JSX components to Svelte components
Downloads
4
Readme
jsx2svelte
jsx2svelte is a Compiler that compiles React JSX components to svelte components.
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)