WIP: Dioxus-webview
This commit is contained in:
1 parent
28ac37a8b2
commit
9c01736895
9 files changed
+113
-20
No files matched your search
@@ -12,7 +12,10 @@ fn main() {
|
||||
/// This macro makes writing functional components elegant, similar to how Rocket parses URIs.
|
||||
///
|
||||
/// You don't actually *need* this macro to be productive, but it makes life easier, and components cleaner.
|
||||
/// This approach also integrates well with tools like Rust-Analyzer
|
||||
/// This approach also integrates well with tools like Rust-Analyzer.
|
||||
///
|
||||
/// Notice that Context is normally generic over props, but RA doesn't care when in proc-macro mode.
|
||||
/// Also notice that ctx.props still works like you would expect, so migrating to the macro is easy.
|
||||
#[fc]
|
||||
fn example(ctx: &Context, name: String) -> VNode {
|
||||
html! { <div> "Hello, {name}!" </div> }
|
||||
|
||||
@@ -76,8 +76,9 @@ async fn fibsum(req: Request<()>) -> tide::Result<tide::Response> {
|
||||
<div class="font-medium text-6xl">
|
||||
{format!("{}",fib_n)}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
// Try another
|
||||
<div class="flex flex-row justify-between mt-6">
|
||||
<a href=format!("http://localhost:8080/fib/{}", other_fib_to_try) class="underline">
|
||||
{"Click to try another number"}
|
||||
|
||||
Reference in new issue
Block a user