Fix: Remove play button from guide example (#1118)

* fix: Remove play button from guide example

* Update index.md

* update other examples
This commit is contained in:
Marc Espín authored and GitHub committed 2023-06-28 09:32:42 -05:00
1 parent 90f80e4dc2
commit 98fc153152
74 files changed
+503 -503

No files matched your search

+1 -1
View File
@@ -72,6 +72,6 @@ cargo add dioxus-desktop
Edit your `main.rs`:
```rust
```rust, no_run
{{#include ../../../examples/hello_world_desktop.rs:all}}
```
@@ -36,7 +36,7 @@ For more information about hot reloading on native platforms and configuration o
Add the following to your main function:
```rust
```rust, no_run
fn main() {
hot_reload_init!();
// launch your application
@@ -1,18 +1,17 @@
# Liveview
Liveview allows apps to *run* on the server and *render* in the browser. It uses WebSockets to communicate between the server and the browser.
Liveview allows apps to _run_ on the server and _render_ in the browser. It uses WebSockets to communicate between the server and the browser.
Examples:
- [Axum Example](https://github.com/DioxusLabs/dioxus/tree/master/packages/liveview/examples/axum.rs)
- [Salvo Example](https://github.com/DioxusLabs/dioxus/tree/master/packages/liveview/examples/salvo.rs)
- [Warp Example](https://github.com/DioxusLabs/dioxus/tree/master/packages/liveview/examples/warp.rs)
## Support
Liveview is currently limited in capability when compared to the Web platform. Liveview apps run on the server in a native thread. This means that browser APIs are not available, so rendering WebGL, Canvas, etc is not as easy as the Web. However, native system APIs are accessible, so streaming, WebSockets, filesystem, etc are all viable APIs.
## Setup
For this guide, we're going to show how to use Dioxus Liveview with [Axum](https://docs.rs/axum/latest/axum/).
@@ -50,17 +49,14 @@ tokio = { version = "1.15.0", features = ["full"] }
Now, set up your Axum app to respond on an endpoint.
```rust
```rust, no_run
{{#include ../../../examples/hello_world_liveview.rs:glue}}
```
And then add our app component:
```rust
```rust, no_run
{{#include ../../../examples/hello_world_liveview.rs:app}}
```
And that's it!
+3 -3
View File
@@ -5,8 +5,8 @@ Build a mobile app with Dioxus!
Example: [Todo App](https://github.com/DioxusLabs/example-projects/blob/master/ios_demo)
## Support
Mobile is currently the least-supported renderer target for Dioxus. Mobile apps are rendered with either the platform's WebView or experimentally through [WGPU](https://github.com/DioxusLabs/blitz). WebView doesn't support animations, transparency, and native widgets.
Mobile is currently the least-supported renderer target for Dioxus. Mobile apps are rendered with either the platform's WebView or experimentally through [WGPU](https://github.com/DioxusLabs/blitz). WebView doesn't support animations, transparency, and native widgets.
Mobile support is currently best suited for CRUD-style apps, ideally for internal teams who need to develop quickly but don't care much about animations or native widgets.
@@ -59,7 +59,7 @@ simple_logger = "*"
Edit your `lib.rs`:
```rust
```rust, no_run
use dioxus::prelude::*;
fn main() {
@@ -73,4 +73,4 @@ fn app(cx: Scope) -> Element {
}
})
}
```
```
+3 -3
View File
@@ -39,19 +39,19 @@ tokio = { version = "1.15.0", features = ["full"] }
Now, set up your Axum app to respond on an endpoint.
```rust
```rust, no_run
{{#include ../../../examples/hello_world_ssr.rs:main}}
```
And then add our endpoint. We can either render `rsx!` directly:
```rust
```rust, no_run
{{#include ../../../examples/hello_world_ssr.rs:endpoint}}
```
Or we can render VirtualDoms.
```rust
```rust, no_run
{{#include ../../../examples/hello_world_ssr.rs:second_endpoint}}
```
+2 -2
View File
@@ -29,7 +29,7 @@ cargo add dioxus-tui
Then, edit your `main.rs` with the basic template.
```rust
```rust, no_run
{{#include ../../../examples/hello_world_tui.rs}}
```
@@ -41,6 +41,6 @@ cargo run
Press "ctrl-c" to close the app. To switch from "ctrl-c" to just "q" to quit you can launch the app with a configuration to disable the default quit and use the root TuiContext to quit on your own.
```rust
```rust, no_run
{{#include ../../../examples/hello_world_tui_no_ctrl_c.rs}}
```
+1 -1
View File
@@ -52,7 +52,7 @@ cargo add dioxus-web
Edit your `main.rs`:
```rust
```rust, no_run
{{#include ../../../examples/hello_world_web.rs}}
```