Application prototype #14
@ -9,13 +9,13 @@ struct Element {
|
|||||||
rep: DVector<f64>,
|
rep: DVector<f64>,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct EditorState {
|
struct AppState {
|
||||||
elements: Signal<Vec<Element>>
|
elements: Signal<Vec<Element>>
|
||||||
}
|
}
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn Editor() -> View {
|
pub fn App() -> View {
|
||||||
let state = EditorState {
|
let state = AppState {
|
||||||
elements: create_signal(vec![
|
elements: create_signal(vec![
|
||||||
Element {
|
Element {
|
||||||
id: String::from("central"),
|
id: String::from("central"),
|
@ -1,13 +1,13 @@
|
|||||||
use sycamore::prelude::*;
|
use sycamore::prelude::*;
|
||||||
|
|
||||||
mod editor;
|
mod app;
|
||||||
|
|
||||||
use editor::Editor;
|
use app::App;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
sycamore::render(|| {
|
sycamore::render(|| {
|
||||||
view! {
|
view! {
|
||||||
Editor {}
|
App {}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user