Skip to content

Latest commit

 

History

History
executable file
·
36 lines (25 loc) · 595 Bytes

File metadata and controls

executable file
·
36 lines (25 loc) · 595 Bytes

Usage

Import library and components, register all your components for your page and then start application.

main.js

import jails from 'jails-js'
import * as myComponent from './my-component'

jails.register('my-component', myComponent)
jails.start()

html

    <my-component>
        <h1>Hello World!</h1>
        <!-- More HTML Code -->
        <p>This is my simple component</p>
    </my-component>

my-component.js

export default function myComponent ({ main, elm }) {
    
    main( _ => {
        console.log('Hello World!!!', elm)
    })
}