!LtIECwsjkkjinzHTTB:matrix.org

Support/Help

863 Members
7 Servers

Load older messages


SenderMessageTime
30 Sep 2023
@_discord_292724790744317953:t2bot.ioxkrebs_ then was telling me to add dyn 21:08:37
@_discord_292724790744317953:t2bot.ioxkrebs_ let me retry 21:08:40
@_discord_326088262118670337:t2bot.iokirillsemyonkin its because you didnt change impl<T> to impl<T, E> 21:08:48
@_discord_292724790744317953:t2bot.ioxkrebs_ eh yeah maybe i forgot it mhm 21:09:06
@_discord_326088262118670337:t2bot.iokirillsemyonkin you might be able to omit E entirely and do for Result<T, _> idk 21:09:42
@_discord_326088262118670337:t2bot.iokirillsemyonkin or at least not include it in the ResultOpt<T> 21:09:55
@_discord_292724790744317953:t2bot.ioxkrebs_ it work for now
I
LOVE
YOU
21:13:33
@_discord_292724790744317953:t2bot.ioxkrebs_ now it's late for me, so i'll continue fix code tomorrow, really thanks for help, i learnt a lot 21:14:10
@_discord_292724790744317953:t2bot.ioxkrebs_ -bow- 21:14:19
1 Oct 2023
@_discord_276431762815451138:t2bot.iounixorn joined the room.21:30:44
@_discord_276431762815451138:t2bot.iounixorn Does anybody know whats the difference between a prop passed with ~ and ones passed without it? Like so:
<MyComponent ~prop="foo" />
vs.
<MyComponent prop="foo" />
the docs just say they are different from Component Properties: https://yew.rs/docs/concepts/html#specifying-attributes-and-properties but when I have a Property on a component it worked both with and without ~ as I expected
21:30:45
@_discord_326088262118670337:t2bot.iokirillsemyonkin i believe it is js properties set for the dom element object 22:02:27
@_discord_326088262118670337:t2bot.iokirillsemyonkin component properties (props) are different thing from those, as mentioned in the doc 22:03:16
@_discord_326088262118670337:t2bot.iokirillsemyonkin ngl if that what it is (js properties/fields), and you have it working for components, then its kinda weird, possibly a bug 22:05:57
@_discord_276431762815451138:t2bot.iounixorn hmm, that's what I also thought at first but if I just add a prop that is not specified in a prop struct it also does not work. So regardless of the ~ you need the property specified in your component. 22:20:48
@_discord_276431762815451138:t2bot.iounixorn when trying the communication_child_to_parent example in yew and changing the custom on_clicked=... prop to ~on_clicked=... also did not change the behaivour of the example 22:23:34
2 Oct 2023
@_discord_120619855056601088:t2bot.ioworldsender if the parser accepts the syntax for components, I don't think that's intended. It should make no difference there, though (but please use the syntax without ~)
for elements, the syntax differentiates between attributes and properties
00:57:54
@temp4096:matrix.orgtemp4096 joined the room.05:43:50
@_discord_109398511996424192:t2bot.iorollokb yew::virtual_dom::Key

Why can't you build this from arbitary bvalues
14:59:06
@_discord_886648165451845694:t2bot.ioautuwn#0 changed their profile picture.20:07:59
3 Oct 2023
@_discord_456472171473141761:t2bot.iotheprimeagen#0 changed their display name from theprimeagen to theprimeagen#0.01:37:39
@_discord_463922799212232718:t2bot.ioa_busch joined the room.01:38:09
@_discord_463922799212232718:t2bot.ioa_busch hi there, I've been looking at Yew 0.21 a little bit, and seems there are more breaking changes than was mentioned in the release notes, in particular regarding the html! macro. If I understand correctly, it used to accept any expression that could be turned into Html, which included anything that had a .to_string() (for instance, a chrono::DateTime), but now it only accepts things that implement ToHtml, which doesn't seem to be implemented for nearly as many things as before... 01:38:10
@_discord_463922799212232718:t2bot.ioa_busch basically, just wanted to check my understanding is correct 01:38:28
@_discord_463922799212232718:t2bot.ioa_busch I guess the fix is to add a lot more .to_string() 01:38:41
@_discord_905608504084148254:t2bot.iobocarwane joined the room.04:14:21
@_discord_493176898692579343:t2bot.iosuttycups joined the room.06:52:43
@_discord_493176898692579343:t2bot.iosuttycupsDownload main.rs06:52:44
@_discord_493176898692579343:t2bot.iosuttycups Hi there, I'm having trouble getting a basic use_state set up -- I tried to structure my code very similarly to the tutorial but am getting an error regarding IntoPropValue not being implemented. I've tried a bunch of variations and nothing seems to work:
error[E0277]: the trait bound `&QueryResultListProps: IntoPropValue<Vec<QueryResult>>` is not satisfied
  --> src\main.rs:38:40
   |
38 |             <QueryResultList results={ &*query_results_handle } />
   |                              -------   ^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoPropValue<Vec<QueryResult>>` is not implemented for `&QueryResultListProps`     
   |                              |
   |                              required by a bound introduced by this call    
   |
   = help: the following other types implement trait `IntoPropValue<T>`:
             <bool as IntoPropValue<ChildrenRenderer<VNode>>>
             <char as IntoPropValue<ChildrenRenderer<VNode>>>
             <isize as IntoPropValue<ChildrenRenderer<VNode>>>
             <i8 as IntoPropValue<ChildrenRenderer<VNode>>>
             <i16 as IntoPropValue<ChildrenRenderer<VNode>>>
             <i32 as IntoPropValue<ChildrenRenderer<VNode>>>
             <i64 as IntoPropValue<ChildrenRenderer<VNode>>>
             <i128 as IntoPropValue<ChildrenRenderer<VNode>>>
           and 47 others
note: required by a bound in `QueryResultListPropsBuilder::results`
  --> src\main.rs:52:19
   |
52 | #[derive(Default, Properties, PartialEq)]
   |                   ^^^^^^^^^^ required by this bound in `QueryResultListPropsBuilder::results`
53 | struct QueryResultListProps {
54 |     results: Vec<QueryResult>,
   |     ------- required by a bound in this associated function
   = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0277`.
error: could not compile `frontend` (bin "frontend") due to previous error
06:52:45
@_discord_493176898692579343:t2bot.iosuttycups Hit the character limit, but here's a link to the line where the error is pointed out: https://github.com/suttonbradley/clippers/blob/58a6ff91d813f3ab456361698bcdae1cc648a437/frontend/src/main.rs#L38

Thanks in advance for any help/suggestions 🙂
06:56:18

There are no newer messages yet.


Back to Room ListRoom Version: 6