Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Günter Zöchbauer
    @zoechi
    Is there any way of adding attributes conditionally?
    Günter Zöchbauer
    @zoechi
    I found that I can create the view using VTag::new(...)yewstack/yew#1269
    Is there a way to add an event handler to such a tag?
    Is there a disadvantage of doing it this way compared to JSX except syntax convenience?
    matrixbot
    @matrixbot
    zoechi When I want to pass properties to the root component, how do I create an instance the props?
    Props::builder().build() does not work because there does not seem to be a build() method.
    I haven't figured out yet how the IDE would provide more information about what methods ::builder() has to offer.
    matrixbot
    @matrixbot
    zoechi Just Props{} lists all fields as missing even though all have prop_or or prop_or_default set
    Günter Zöchbauer
    @zoechi
    Props::builder().build() is working now. Seems to have been some Rust build issue.
    Philip Peterson
    @philip-peterson
    Anyone still hang out in the yew Gitter? Discord is quiet these days... 👀
    Justin Starry
    @jstarry
    @philip-peterson are you in the wrong Discord? there's been a fair amount of activity
    Philip Peterson
    @philip-peterson
    I would hope not! There’s just four channels, right? Last few days there has been some activity, maybe I am just used to more active projects, idk. Most of the PRs or issues I comment on are pretty silent and I don’t see much design discussion happening in the channels, maybe that’s why it feels different than the Gitter did a few months ago. Is Discord pretty much the only place things are discussed?
    Teymour Aldridge
    @teymour-aldridge
    There’s some discussion on Github Issues/PRs but other than that the only other avenue is Discord.
    Philip Peterson
    @philip-peterson
    Ok! Well, glad I checked anyway.
    Giacomo Cariello
    @giacomocariello
    Hi all
    Is there a way to interact with a yew App from an external javascript routine?
    madmaxio
    @madmaxio
    Sure, you need to use wasm-bindgen or stdweb (which is unsupported)
    Giacomo Cariello
    @giacomocariello
    I'm using wasm-bindgen. Let's say I have two yew apps loaded in different elements of the same DOM. How do I send messages from one to the other and vice-versa?
    Giacomo Cariello
    @giacomocariello
    I'm wondering whether I need to use event dispatching with a custom event or if there's another way I can follow.
    madmaxio
    @madmaxio
    Check agents functionality first, but because there will be (most likely) two separate events loops in you case agents might not work for you. In this case use some js variable for interaction.
    But the pattern itself is strange, try bring it two single app with separate components, if you can.
    Kelly Thomas Kline
    @kellytk
    @philip-peterson I am
    Kelly Thomas Kline
    @kellytk
    @teymour-aldridge yewstack/yew#1313 is nice thanks for it
    matrixbot
    @matrixbot
    jstarry FYI there's now a new matrix server which is connected to the Yew #development Discord channel here: https://matrix.to/#/!HvNEDXvXsveDVzOUNK:privacytools.io?via=privacytools.io&via=t2bot.io
    jstarry Thanks chrysn !
    Kelly Thomas Kline
    @kellytk
    How can Yew be used without wasm-pack?
    Kelly Thomas Kline
    @kellytk
    Regarding that doc article, it doesn't cover the .html file I assume is necessary. Is that intended?
    madmaxio
    @madmaxio
    I think it is hard to do.
    Kelly Thomas Kline
    @kellytk
    Why?
    matrixbot
    @matrixbot

    Andreas Weinzierl > <@jstarry:matrix.org> FYI there's now a new matrix server which is connected to the Yew #development Discord channel here: https://matrix.to/#/!HvNEDXvXsveDVzOUNK:privacytools.io?via=privacytools.io&via=t2bot.io

    Nice

    madmaxio
    @madmaxio
    You need somehow to call wasm from web app
    Stephen Becker IV
    @sbeckeriv
    Hello, I am rendering a Vec<String>. when I remove a string via Msg and yew rerenders my Vec<String> it does not correctly render the Html for one of the elements. The one after the removed element. When i render html!{<>{domain} <div my normal div code></div></>} the domain string shows up but not the div. https://github.com/sbeckeriv/personal_search/blob/master/search/crate/src/app.rs#L138 <- the map of my vec
    9 replies
    madmaxio
    @madmaxio
    Yeah, better ask there.
    Kelly Thomas Kline
    @kellytk
    Has the pace of dev halted again?
    madmaxio
    @madmaxio
    Why? I think it's ok.
    matrixbot
    @matrixbot
    chrysn If you see little traffic here that's probably because the project has abandoned gitter as a means of communication. They now run a discord "server", which is also bridged to matrix. Matrix bridge is at https://matrix.to/#/+yew:privacytools.io, discord is linked from the project page.
    Kelly Thomas Kline
    @kellytk
    @chrysn My query is based on commit/issue/PR activity, not chat here
    madmaxio
    @madmaxio
    I personally think 24/7 commits are not a good thing also for that scale project.
    Kelly Thomas Kline
    @kellytk
    I obviously didn't say that either
    B3NNY
    @Ben-Lichtman
    hi. I'm trying to manually create a JS object but for some reason it's not working:
                    let memory = Map::new();
            memory.set(&JsValue::from("asdf"), &JsValue::NULL);
            console::log_1(&stringify(&memory).unwrap());
    using js_sys
    what gets output is: {}
    anyone able to help with this?
    stringify is JSON.stringify from js_sys
    I have also tried Reflect and Object::define_property()
    both of those fail (give {}) or give Error
    madmaxio
    @madmaxio
    Better to ask wasm-bindgen people on discord
    It is not directly related to Yew.
    madmaxio
    @madmaxio
    Probably you doesn't need stringify (it will not work), because of
    A JsValue doesn't actually live in Rust right now but actually in a table owned by the wasm-bindgen generated JS glue code. Eventually the ownership will transfer into wasm directly
    Nick Hu
    @nickhu:matrix.org
    [m]
    Hi, is there any way to use ReaderService from a functional component? Or is the way that services are architected actually prohibitive of this? By the way, what's the difference between the functional components in the yew-functional versus the yewtil crate? I also see there's pure components which are something else also..
    madmaxio
    @madmaxio
    Better create issue, or ask on discord about this.