Created
October 26, 2019 18:53
-
-
Save nikolalsvk/16551d37a79720e6a139c196790f0e91 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint no-console: 0 */ | |
// Run this example by adding <%= javascript_pack_tag 'hello_svelte' %> (and | |
// <%= stylesheet_pack_tag 'hello_svelte' %> if you have styles in your component) | |
// to the head of your layout file, | |
// like app/views/layouts/application.html.erb. | |
// All it does is render <div>Hello Svelte!</div> at the bottom of the page. | |
import App from '../app.svelte' | |
document.addEventListener('DOMContentLoaded', () => { | |
const app = new App({ | |
target: document.body, | |
props: { | |
name: 'Svelte' | |
} | |
}); | |
window.app = app; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment