From 9237d02cf279aa78b0afac3711ca8414780db2b5 Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Tue, 2 Mar 2021 01:47:27 -0500 Subject: [PATCH] Feat: update docs a bit --- README.md | 25 ++++++++++++++++--------- docs/gettingstarted/webapps.md | 26 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 docs/gettingstarted/webapps.md diff --git a/README.md b/README.md index 488af04fc..60b7d80d2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

🌗🚀 Dioxus

- A concurrent, functional, virtual DOM for Rust + Frontend that scales.

@@ -9,6 +9,7 @@ Dioxus is a portable, performant, and ergonomic framework for building cross-platform user experiences in Rust. + ```rust static Example: FC<()> = |ctx, props| { let (selection, set_selection) = use_state(&ctx, || "...?"); @@ -16,8 +17,8 @@ static Example: FC<()> = |ctx, props| { ctx.render(rsx! { div { h1 { "Hello, {selection}" } - button { "?", onclick: {move |_| set_selection("world!")}} - button { "?", onclick: {move |_| set_selection("Dioxus 🎉")}} + button { "?", onclick: move |_| set_selection("world!")} + button { "?", onclick: move |_| set_selection("Dioxus 🎉")} } }) }; @@ -26,12 +27,12 @@ static Example: FC<()> = |ctx, props| { Dioxus can be used to deliver webapps, desktop apps, static pages, liveview apps, Android apps, iOS Apps, and more. At its core, Dioxus is entirely renderer agnostic and has great documentation for creating new renderers for any platform. ### **Things you'll love ❤️:** +- Ergonomic design - Minimal boilerplate -- Ergonomic lifetime design for props and state management - Simple build, test, and deploy -- "Dioxus Designer" for instant component reloading -- Support for html! **and** rsx! templating +- Support for html! and rsx! templating - SSR, WASM, desktop, and mobile support +- Rust! (enums, static types, modules, efficiency) ## Get Started with... @@ -64,8 +65,14 @@ Dioxus can be used to deliver webapps, desktop apps, static pages, liveview apps --- ## Dioxus LiveHost -Dioxus LiveHost is a paid service dedicated to hosting your Dioxus Apps - whether they be server-rendered, wasm-only, or a liveview. LiveHost enables a wide set of features: +Dioxus LiveHost is a paid service that accelerates the deployment of Dioxus Apps. It provides CI/CD, testing, monitoring, scaling, and deployment specifically for Dioxus apps. +- It's the fastest way of launching your next internal tool, side-project, or startup. 🚀 + + + + + -For small teams, LiveHost is free 🎉. Check out the pricing page to see if Dioxus LiveHost is good fit for your team. + diff --git a/docs/gettingstarted/webapps.md b/docs/gettingstarted/webapps.md new file mode 100644 index 000000000..5474fc3b9 --- /dev/null +++ b/docs/gettingstarted/webapps.md @@ -0,0 +1,26 @@ +# Choose your architecture type: +- Static Pages +- Server-side-rendering +- Pure SPA +- Hybrid SPA (liveview) + + +## Static Pages +You'll want the TextRenderer crate. +Use it imperatively by passing props and rendering to string. + +## Server-side-rendering +You'll want the TextRenderer crate. +Serve it with a dedicated middleware crate. + +## Pure SPA +You'll want the WebSys Crate. + +## Hybrid SPA (hydration) +You'll want the WebSys Crate +You'll want the TextRenderer crate + + +## Hybrid SPA (liveview) +You'll want the WebSys crate. +You'll want the Liveview crate.