0.1.12 • Published 1 year ago

svelte-react-kit v0.1.12

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

svelte-react-kit

svelte-react-kit

Use React components inside Svelte apps.

This repo is the mirror of RichHarris/react-svelte with some bonus given we also add MaterialUI to the mix here.

<script>
  import Button from "@material-ui/core/Button";
  import ReactAdapter from "./utils/ReactAdapter.svelte";
</script>

<ReactAdapter
  el={Button}
  class="mui-btn"
  children="Hello"
  variant="contained"
  color="primary"
  onClick={() => alert("hello world!")}
/>

<style>
  /**
   * Styling a React Component from within a Svelte Component.
   */
  :global(.mui-btn) {
    margin: 20px;
  }
</style>

Check the live demo here, and don't forget to see the BlogPost: Using React Within Svelte Apps.

Usage

npm i svelte-react-kit

You can also check a sample app here.

License

MIT

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.1

1 year ago