A slightly cursed transpiler for JSX-like syntax to Lustre in Gleam
at master 389 B view raw
1import lustre 2import lustre/attribute 3import lustre/element 4import lustre/element/html 5import lustre/ui 6 7pub fn main() { 8 let styles = [#("width", "100vw"), #("height", "100vh"), #("padding", "1rem")] 9 10 let app = lustre.element((<div style={styles}> 11 <h1>Hello, world.</h1> 12 <h2>Welcome to Lustre.</h2> 13 </div>)) 14 let assert Ok(_) = lustre.start(app, "#app", Nil) 15 16 Nil 17}