aleb2000 / split-yew Goto Github PK
View Code? Open in Web Editor NEWYew component for the Split.js library.
License: MIT License
Yew component for the Split.js library.
License: MIT License
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!
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)
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.