Skip to content
Discussion options

You must be logged in to vote

Ok, here's a minimal reproduction

use leptos::prelude::*;
use reactive_stores::{Field, Store};

#[derive(Store, Debug, Clone)]
pub struct Part {
    pub id: usize,
    #[store(key: usize = |part| part.id)]
    pub chapters: Vec<Structure>,
}

#[derive(Store, Debug, Clone)]
pub struct Structure {
    pub id: usize,
    #[store(key: usize = |part| part.id)]
    pub parts: Vec<Part>,
}

#[component]
fn App() -> impl IntoView {
    console_error_panic_hook::set_once();

    let draft_structure = Store::new(Structure {
        id: 0,
        parts: vec![Part {
            id: 1,
            chapters: vec![],
        }],
    });

    view! {
        <For
            each=move || draft_structure.p…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@CedricGARVENES-Exalt
Comment options

@gbj
Comment options

gbj May 4, 2026
Maintainer

@CedricGARVENES-Exalt
Comment options

@gbj
Comment options

gbj May 4, 2026
Maintainer

Answer selected by CedricGARVENES-Exalt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants