Skip to content

A module reference level error on the Adding More Routes page of the hot-dog. #524

@lingdiansr

Description

@lingdiansr

In the Our Favorites Page section of the document, the example code for the Favorites page has an incorrect reference to list_dogs; it should be super::super::backend::list_dogs instead of super::backend::list_dogs.

let mut favorites = use_resource(super::backend::list_dogs).suspend()?;

Because according to the file organization structure of the example code, the super of Favorites refers to the components folder, which is juxtaposed with backend.rs. So a super can't be accessed. It is recommended to change it to crate::backend::list_dogs.

```sh
├── Cargo.toml
├── assets
│ └── main.css
└── src
├── backend.rs
├── components
│ ├── favorites.rs
│ ├── mod.rs
│ ├── nav.rs
│ └── view.rs
└── main.rs
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions