gihrig / leptos-tutorial Goto Github PK
View Code? Open in Web Editor NEWWorking through the Leptos Book
License: MIT License
Working through the Leptos Book
License: MIT License
Error as of tag leptos tut(lesson): 6.1 Async - Loading Data with Resources in this repo.
I'm working through the Leptos Book/Tutorial and I've hit a wall at section 6.1 Loading Data with Resources.
I have copied the Source and Cargo.toml from CodeSandbox.
This code works as expected on CodeSandbox but I'm getting a compile error on my local machine.
I have tried the CodeSandbox Source form the next two entries (6.2 Suspense, 6.3 Transition) all work as expected on CodeSandbox, but fail with similar errors relating to create_resource
on my machine.
I have noted the compiler help:
= help: the trait `std::ops::Fn<()>` is not implemented for `ReadSignal<{integer}>`
= note: wrap the `ReadSignal<{integer}>` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `leptos::create_resource`
and fiddled around trying to implement its suggestion to no avail. But I really don't know enough about rust or leptos at this point to make sense of all this. I'm pretty much just guessing.
My environment:
rustc -V: rustc 1.73.0-nightly (474709a9a 2023-08-03)
trunk -V: trunk 0.17.2
macOS: Monterey 12.6.7
Cargo.toml:
[package]
name = "app"
version = "0.1.0"
edition = "2021"
[dependencies]
leptos = { git = "https://github.com/leptos-rs/leptos" }
console_log = "0.2"
log = "0.4"
console_error_panic_hook = "0.1.7"
gloo-timers = { version = "0.2", features = ["futures"] }
I tried rolling back to rust v 1.69 and leptos 0.4.0 and still got the same result.
Any suggestions, hints or guess are much appreciated!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.