Hi, i have this error : no method named restore found for enum Result<StorageService, &str> in the current scope method not found in Result<StorageService, &str> in line: let Json(database) = storage.restore(KEY); i used 0.18 version of Yew.
restore
Result<StorageService, &str>
In Yew 0.18 restore method is static with 2 arguments, so code should be now:
fn create(_: Self::Properties, link: ComponentLink<Self>) -> Self { let storage = StorageService::new(Area::Local).expect("Error"); let Json(database) = StorageService::restore(&storage, KEY); let database = database.unwrap_or_else(|_| Database::new()); App { link, storage, database, temp_task: Task::new(), } }
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi, i have this error : no method named
restore
found for enumResult<StorageService, &str>
in the current scopemethod not found in
Result<StorageService, &str>
in line: let Json(database) = storage.restore(KEY); i used 0.18 version of Yew.
In Yew 0.18 restore method is static with 2 arguments, so code should be now: