Comments (3)
The majority of methods for Signal
are implemented on the Readable
and Writable
trait. One of the methods on the Readable trait is cloned
which clones the value out of the signal.
This seems more like a docs/discoverability issue than anything else. I agree looking at the docs of Signal
, it isn't clear that you can call the struct or use methods from readable and writable. It would be more clear if we included more examples in the signal docs (including calling the signal like a function) and links to the relevant traits (Readable
and Writable
)
Implementing the Fn
trait itself would also be much more clear than Deref
, but unfortunately fn_traits
has not landed in stable yet.
from dioxus.
Thanks, that's good to know about cloned
. I tried using read
, but that returned a GenerationalRef
which I wasn't sure what to do with.
I was unaware of fn_traits
. That also seems like a bad idea in my opinion, but that's a separate issue.
from dioxus.
The docs were improved in #2460 to reference the readable and writable traits and include more examples
from dioxus.
Related Issues (20)
- R
- Dropping files (`ondrop`) doesn't work on Windows HOT 3
- Destructuring tuples panics #[component] macro HOT 2
- Support for the `onclose` event handler
- `launch` should not be in prelude and `LaunchBuilder` and associated configs need to be reworked
- Implement module namespacing in `routable` derive macro HOT 1
- Importing file_engine feature does not allow the use of files() method in FormData
- The new syntax does not allow you to create an initial state without violating the hook creation rules HOT 2
- Eval suddenly stops
- Static site generation is a CLI feature for sites with sitemaps
- Script ignores src attribute
- failed to run custom build command for `aws-lc-sys v0.21.2`
- `FromQuery` applies url encoding after display impl
- I cannot startapp why HOT 1
- Blank screen after dx serve HOT 1
- Allow binding to 0.0.0.0 HOT 1
- Memo referenced in event handler is evaluating too soon?
- 'a' element with mailto link opens browser instead of mail program
- Error opening autocomplete window in tailwind css HOT 2
- Nested RSX does not hot reload HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dioxus.