Giter VIP home page Giter VIP logo

split-yew's People

Contributors

aleb2000 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

split-yew's Issues

Nothing rendering

Hello again!
I just picked up where I left off on the web component of my project, and so far split-yew compiles with the latest.
However, nothing shows up!
My html looks like this:

<!doctype html>                                                             
<html>                                                                      
  <head>                                                                    
    <meta charset="utf-8" />                                                
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <!-- <title>Yew App</title> -->                                         
    <script type="importmap">                                               
      {                                                                     
        "imports": {                                                        
          "split.js": "https://unpkg.com/[email protected]/dist/split.es.js"   
        }                                                                   
      }                                                                     
    </script>                                                               
  </head>                                                                   
  <body></body>                                                             
</html>                                                                     

My test component looks like this:

use split_yew::Split;                     
use yew::prelude::*;                      
                                          
#[function_component(CompA)]              
pub fn comp_a() -> Html {                 
    html! {                               
        <>                                
        {"hello"}                         
        </>                               
    }                                     
}                                         
                                          
#[function_component(CompB)]              
pub fn comp_b() -> Html {                 
    html! {                               
        <>                                
        {"hello2"}                        
        </>                               
    }                                     
}                                         
#[function_component(App)]                
pub fn app() -> Html {                    
    html! {                               
        <>                                
            <Split                        
            min_size={500.0}              
            min_sizes={vec![100.0, 200.0]}
            >                             
            <CompA />                     
            <CompB />                     
            </Split>                      
            {"test2"}                     
        </>                               
    }                                     
}                                         

But there's no gutter, or any signs of Split. The text does render, but as if there was no split at all!
Help?
Thanks!

Not working with yew 0.21.0

error[E0277]: the trait bound split_yew::Split: yew::Component is not satisfied
--> ui/src/components/app/app.rs:12:10
|
12 |
| ^^^^^ the trait yew::Component is not implemented for split_yew::Split
|
= help: the trait yew::Component is implemented for ContextProvider<T>
= note: required for split_yew::Split to implement yew::BaseComponent
= note: this error originates in the macro html (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: the function or associated item new exists for struct VChild<Split>, but its trait bounds were not s
atisfied
--> ui/src/components/app/app.rs:12:10
|
12 |
| ^^^^^ function or associated item cannot be called on VChild<Split> due to unsatisfied trait bounds
|
::: .cargo/git/checkouts/split-yew-84a544648acafcab/8548d2a/src/lib.rs:99:1
|
99 | pub struct Split {
| ---------------- doesn't satisfy split_yew::Split: yew::BaseComponent
|
= note: the following trait bounds were not satisfied:
split_yew::Split: yew::BaseComponent
= note: this error originates in the macro html (in Nightly builds, run with -Z macro-backtrace for more info)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.