Yello, looking at how luste looks like, so I just copy pasted stuff from the quickstart guide, and I can't get it to work quite.
pub fn main() {
let app = lustre.application(init, update, view)
let assert Ok(_) = lustre.start(app, "#app", Nil)
}
type Model {
Model(total: Int, cats: List(Cat))
}
type Cat {
Cat(id: String, url: String)
}
fn init(_args) -> #(Model, Effect(Msg)) {
let model = Model(total: 0, cats: [])
#(model, effect.none())
}
type Msg {
UserClickedAddCat
UserClickedRemoveCat
ApiReturnedCats(Result(List(Cat), rsvp.Error))
}
fn update(model: Model, msg: Msg) -> #(Model, Effect(Msg)) {
...
}
fn get_cat() -> Effect(Msg) {
...
}
/*error:
Private type used in public interface
The following type is private, but is being used by this public export.
Msg
Private types can only be used within the module that defines them.
*/
pub fn view(model: Model) -> Element(Msg) {
....
}
Am I missing something?