diff --git a/examples/mobile_demo/README.md b/examples/mobile_demo/README.md index 178b2f733..bf0ec5166 100644 --- a/examples/mobile_demo/README.md +++ b/examples/mobile_demo/README.md @@ -6,41 +6,6 @@ Right now, Dioxus supports mobile targets including iOS and Android. However, ou This project was generated using [cargo-mobile2](https://github.com/tauri-apps/cargo-mobile2). We have yet to integrate this generation into the Dioxus-CLI. The open issue for this is [#1157](https://github.com/DioxusLabs/dioxus/issues/1157). -## Running on iOS - -First, you'll want to make sure you have the appropriate iOS targets installed. - -The two targets you'll use the most are: - -- `aarch64-apple-ios-sim` -- `aarch64-apple-ios` - -These can be added using -- `rustup target add aarch64-apple-ios-sim` -- `rustup target add aarch64-apple-ios` - -From there, you'll want to get a build of the crate using whichever platform you're targeting (simulator or actual hardware). For now, we'll just stick with the simulator: -- `cargo build --target aarch64-apple-ios-sim` - -Then, you'll want to open XCode. This might take awhile if you've never opened XCode before. The command you want to use is: -- `cargo apple open` - -This will open XCode with this particular project. - -From there, just click the "play" button with the right target and the app should be running! - -![ios_demo](ios_demo.png) - -Note that clicking play doesn't cause a new build, so you'll need to keep rebuilding the app between changes. The tooling here is very young, so please be patient. If you want to contribute to make things easier, please do! We'll be happy to help. - - -## Running on Android - -Again, we want to make sure we have the right targets installed. - -The common targets here are -- aarch64-linux-android -- armv7-linux-androideabi -- i686-linux-android -- x86_64-linux-android +## Running this project +Because the tooling and ecosystem is still young, Dioxus mobile can be difficult to setup and run. We have [detailed guides](https://dioxuslabs.com/learn/0.5/getting_started/mobile) for creating, building, and running on both iOS and Android. diff --git a/examples/tailwind/README.md b/examples/tailwind/README.md index 95d01f408..6dca4b775 100644 --- a/examples/tailwind/README.md +++ b/examples/tailwind/README.md @@ -2,135 +2,6 @@ Example: Basic Tailwind usage This example shows how an app might be styled with TailwindCSS. -# Setup +## Running -1. Install the Dioxus CLI: - -```bash -cargo install dioxus-cli -``` - -2. Install npm: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm -3. Install the tailwind css cli: https://tailwindcss.com/docs/installation -4. Initialize the tailwind css project: - -```bash -npx tailwindcss init -``` - -This should create a `tailwind.config.js` file in the root of the project. - -5. Edit the `tailwind.config.js` file to include rust files: - -```json -module.exports = { - mode: "all", - content: [ - // include all rust, html and css files in the src directory - "./src/**/*.{rs,html,css}", - // include all html files in the output (dist) directory - "./dist/**/*.html", - ], - theme: { - extend: {}, - }, - plugins: [], -} -``` - -6. Create a `input.css` file with the following content: - -```css -@tailwind base; -@tailwind components; -@tailwind utilities; -``` - -7. Create a `Dioxus.toml` file with the following content that links to the `tailwind.css` file: - -```toml -[application] - -# App (Project) Name -name = "Tailwind CSS + Dioxus" - -# Dioxus App Default Platform -# desktop, web, mobile, ssr -default_platform = "web" - -# `build` & `serve` dist path -out_dir = "dist" - -# resource (public) file folder -asset_dir = "public" - -[web.app] - -# HTML title tag content -title = "dioxus | ⛺" - -[web.watcher] - -# when watcher trigger, regenerate the `index.html` -reload_html = true - -# which files or dirs will be watcher monitoring -watch_path = ["src", "public"] - -# include `assets` in web platform -[web.resource] - -# CSS style file -style = ["/tailwind.css"] - -# Javascript code file -script = [] - -[web.resource.dev] - -# serve: [dev-server] only - -# CSS style file -style = [] - -# Javascript code file -script = [] -``` - -## Bonus Steps - -8. Install the tailwind css vs code extension -9. Go to the settings for the extension and find the experimental regex support section. Edit the setting.json file to look like this: - -```json -"tailwindCSS.experimental.classRegex": ["class: \"(.*)\""], -"tailwindCSS.includeLanguages": { - "rust": "html" -}, -``` - -# Development - -1. Run the following command in the root of the project to start the tailwind css compiler: - -```bash -npx tailwindcss -i ./input.css -o ./public/tailwind.css --watch -``` - -## Web - -- Run the following command in the root of the project to start the dioxus dev server: - -```bash -dx serve --hot-reload -``` - -- Open the browser to http://localhost:8080 - -## Desktop - -- Launch the dioxus desktop app - -```bash -cargo run -``` +Our [Tailwind](https://dioxuslabs.com/learn/0.5/cookbook/tailwind) guide explains how to setup and run Dioxus-Tailwind projects. \ No newline at end of file diff --git a/packages/autofmt/README.md b/packages/autofmt/README.md index 0b13dc7a9..0de084d03 100644 --- a/packages/autofmt/README.md +++ b/packages/autofmt/README.md @@ -15,7 +15,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/learn/0.4/) | +[Guides](https://dioxuslabs.com/learn/0.5) | [API Docs](https://docs.rs/dioxus-autofmt/latest/dioxus_autofmt) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/check/README.md b/packages/check/README.md index 6375a8316..08257a896 100644 --- a/packages/check/README.md +++ b/packages/check/README.md @@ -15,13 +15,13 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/learn/0.4/) | +[Guides](https://dioxuslabs.com/learn/0.5) | [API Docs](https://docs.rs/dioxus-check) | [Chat](https://discord.gg/XgGxMSkvUM) ## Overview -`dioxus-check` analyzes Dioxus source code and reports errors and warnings. Primarily, it enforces the [Rules of Hooks](https://dioxuslabs.com/learn/0.4/reference/hooks#rules-of-hooks). +`dioxus-check` analyzes Dioxus source code and reports errors and warnings. Primarily, it enforces the [Rules of Hooks](https://dioxuslabs.com/learn/0.5/reference/hooks#rules-of-hooks). ## Contributing diff --git a/packages/cli-config/README.md b/packages/cli-config/README.md index ef2435713..8cad990e3 100644 --- a/packages/cli-config/README.md +++ b/packages/cli-config/README.md @@ -1,4 +1,4 @@ -
+

📦✨ Dioxus CLI Configuration

diff --git a/packages/cli/README.md b/packages/cli/README.md index 93c695e4f..8b353fb83 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -1,4 +1,4 @@ -
+

📦✨ Dioxus CLI

Tooling to supercharge Dioxus projects

@@ -28,9 +28,9 @@ This will download the CLI from the master branch, and install it in Cargo's global binary directory (`~/.cargo/bin/` by default). ### Install from local folder - +Note: The CLI will fail to build projects in debug profile. This is currently under investigation. ```shell -cargo install --path . --debug +cargo install --path . --release ``` ## Get started @@ -68,4 +68,4 @@ title = "Hello" [web.resource.dev] ``` -The full anatomy of `Dioxus.toml` is shown on the [Dioxus website](https://dioxuslabs.com/learn/0.4/CLI/configure). +The full anatomy of `Dioxus.toml` is shown on the [Dioxus website](https://dioxuslabs.com/learn/0.5/CLI/configure). diff --git a/packages/config-macro/README.md b/packages/config-macro/README.md index 6f2b75bd3..f7496a820 100644 --- a/packages/config-macro/README.md +++ b/packages/config-macro/README.md @@ -15,7 +15,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/learn/0.4/) | +[Guides](https://dioxuslabs.com/learn/0.5) | [API Docs](https://docs.rs/dioxus-config-macro/latest/dioxus_core_macro) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/core-macro/README.md b/packages/core-macro/README.md index 497c7c587..9beed0062 100644 --- a/packages/core-macro/README.md +++ b/packages/core-macro/README.md @@ -15,7 +15,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/learn/0.4/) | +[Guides](https://dioxuslabs.com/learn/0.5) | [API Docs](https://docs.rs/dioxus-core-macro/latest/dioxus_core_macro) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/core/README.md b/packages/core/README.md index b48a7d2b2..96e4bbb67 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -73,7 +73,7 @@ fn main() { ``` ## Contributing -- Check out the website [section on contributing](https://dioxuslabs.com/learn/0.4/contributing). +- Check out the website [section on contributing](https://dioxuslabs.com/learn/0.5/contributing). - Report issues on our [issue tracker](https://github.com/dioxuslabs/dioxus/issues). - [Join](https://discord.gg/XgGxMSkvUM) the discord and ask questions! diff --git a/packages/desktop/README.md b/packages/desktop/README.md index 0d0e26247..d9aca2a49 100644 --- a/packages/desktop/README.md +++ b/packages/desktop/README.md @@ -15,7 +15,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/learn/0.4/) | +[Guides](https://dioxuslabs.com/learn/0.5) | [API Docs](https://docs.rs/dioxus-desktop/latest/dioxus_desktop) | [Chat](https://discord.gg/XgGxMSkvUM) @@ -25,7 +25,7 @@ This requires that webview is installed on the target system. WebView is installed by default on macOS and iOS devices, but might not come preinstalled on Windows or Linux devices. To fix these issues, follow the [instructions in the guide](guide-url). -[guide-url]: https://dioxuslabs.com/learn/0.4/getting_started/desktop +[guide-url]: https://dioxuslabs.com/learn/0.5/getting_started/desktop ## Features diff --git a/packages/dioxus-lib/README.md b/packages/dioxus-lib/README.md index 210ea77c3..bb815411a 100644 --- a/packages/dioxus-lib/README.md +++ b/packages/dioxus-lib/README.md @@ -1,4 +1,4 @@ -
+

🌗🚀 Dioxus

A concurrent, functional, virtual DOM for Rust @@ -9,8 +9,8 @@ This overview provides a brief introduction to Dioxus. For a more in-depth guide, make sure to check out: -- [Getting Started](https://dioxuslabs.com/learn/0.4/getting_started) -- [Book (0.4)](https://dioxuslabs.com/learn/0.4/) +- [Getting Started](https://dioxuslabs.com/learn/0.5/getting_started) +- [Book (0.5)](https://dioxuslabs.com/learn/0.5) - [Examples](https://github.com/DioxusLabs/example-projects) # Overview and Goals @@ -34,23 +34,22 @@ Remember: Dioxus is a library for declaring interactive user interfaces—it is ## Brief Overview -All Dioxus apps are built by composing functions that take in a `Scope` which is generic over some `Properties` and return an `Element`. -A `Scope` holds relevant state data for the currently rendered component. +All Dioxus apps are built by composing functions that return an `Element`. -To launch an app, we use the `launch` method for the specific renderer we want to use. In the launch function, we pass the app's `Component`. +To launch an app, we use the `launch` method and use features in ``Cargo.toml`` to specify which renderer we want to use. In the launch function, we pass the app's root `Component`. ```rust, ignore use dioxus::prelude::*; fn main() { - dioxus_desktop::launch(App); + launch(App); } // The #[component] attribute streamlines component creation. // It's not required, but highly recommended. For example, UpperCamelCase components will not generate a warning. #[component] fn App() -> Element { - rsx!("hello world!")) + rsx!("hello world!") } ``` @@ -71,7 +70,7 @@ let value = "123"; rsx!( div { class: "my-class {value}", // <--- attribute - onclick: move |_| log::info!("clicked!"), // <--- listener + onclick: move |_| info!("clicked!"), // <--- listener h1 { "hello world" }, // <--- child } ) @@ -89,21 +88,12 @@ rsx!( ) ``` -Used within components, the `rsx!` macro must be rendered into an `Element` with -the `render` function on Scope. - -If we want to omit the boilerplate of `cx.render`, we can simply pass in -`cx` as the first argument of rsx. This is sometimes useful when we need to -render nodes in match statements. +The `rsx!` macro is what generates the `Element` that our components return. ```rust, ignore -#[component[ +#[component] fn Example() -> Element { - - // both of these are equivalent - rsx!("hello world")) - - rsx!("hello world!") + rsx!("hello world") } ``` @@ -127,7 +117,7 @@ fn App() -> Element { )) } - )) + ) } ``` @@ -147,7 +137,7 @@ fn App() -> Element { title: "My App", color: "red", } - )) + ) } ``` @@ -163,13 +153,13 @@ struct HeaderProps { } #[component] -fn Header(cx: Scope) -> Element { +fn Header(props: HeaderProps) -> Element { rsx!( div { - background_color: "{cx.props.color}" - h1 { "{cx.props.title}" } + background_color: "{props.color}" + h1 { "{props.title}" } } - )) + ) } ``` @@ -184,7 +174,7 @@ fn Header(title: String, color: String) -> Element { background_color: "{color}" h1 { "{title}" } } - )) + ) } ``` @@ -201,13 +191,13 @@ struct HeaderProps<'a> { } #[component] -fn Header(props: HeaderProps -> Element { +fn Header<'a>(props: HeaderProps<'a>) -> Element { rsx!( div { - background_color: "{cx.props.color}" - h1 { "{cx.props.title}" } + background_color: "{props.color}" + h1 { "{props.title}" } } - )) + ) } ``` @@ -235,7 +225,7 @@ but you can turn it off if you wish. ## Hooks While components are reusable forms of UI elements, hooks are reusable forms -of logic. Hooks provide us a way of retrieving state from the `Scope` and using +of logic. Hooks provide us a way of retrieving state from Dioxus' internal `Scope` and using it to render UI elements. By convention, all hooks are functions that should start with `use_`. We can @@ -251,7 +241,7 @@ fn App() -> Element { ``` Hooks are sensitive to how they are used. To use hooks, you must abide by the -["rules of hooks" (borrowed from React)](https://reactjs.org/docs/hooks-rules.html): +["rules of hooks"](https://dioxuslabs.com/learn/0.5/reference/hooks#rules-of-hooks): - Functions with "use\_" should not be called in callbacks - Functions with "use\_" should not be called out of order @@ -270,11 +260,11 @@ fn use_username(d: Uuid) -> bool { } ``` -To create entirely new foundational hooks, we can use the `use_hook` method on `ScopeState`. +To create entirely new foundational hooks, we can use the `use_hook` method. ```rust, ignore fn use_mut_string() -> &mut String { - cx.use_hook(|_| "Hello".to_string()) + use_hook(|_| "Hello".to_string()) } ``` @@ -288,7 +278,7 @@ Using components, templates, and hooks, we can build a simple app. use dioxus::prelude::*; fn main() { - dioxus_desktop::launch(App); + launch(App); } #[component] @@ -299,7 +289,7 @@ fn App() -> Element { div { "Count: {count}" } button { onclick: move |_| count.set(count + 1), "Increment" } button { onclick: move |_| count.set(count - 1), "Decrement" } - )) + ) } ``` diff --git a/packages/dioxus/README.md b/packages/dioxus/README.md index ebd2cdb90..bb815411a 100644 --- a/packages/dioxus/README.md +++ b/packages/dioxus/README.md @@ -1,4 +1,4 @@ -

+

🌗🚀 Dioxus

A concurrent, functional, virtual DOM for Rust @@ -9,8 +9,8 @@ This overview provides a brief introduction to Dioxus. For a more in-depth guide, make sure to check out: -- [Getting Started](https://dioxuslabs.com/learn/0.4/getting_started) -- [Book (0.4)](https://dioxuslabs.com/learn/0.4/) +- [Getting Started](https://dioxuslabs.com/learn/0.5/getting_started) +- [Book (0.5)](https://dioxuslabs.com/learn/0.5) - [Examples](https://github.com/DioxusLabs/example-projects) # Overview and Goals @@ -34,16 +34,15 @@ Remember: Dioxus is a library for declaring interactive user interfaces—it is ## Brief Overview -All Dioxus apps are built by composing functions that take in a `Scope` which is generic over some `Properties` and return an `Element`. -A `Scope` holds relevant state data for the currently rendered component. +All Dioxus apps are built by composing functions that return an `Element`. -To launch an app, we use the `launch` method for the specific renderer we want to use. In the launch function, we pass the app's `Component`. +To launch an app, we use the `launch` method and use features in ``Cargo.toml`` to specify which renderer we want to use. In the launch function, we pass the app's root `Component`. ```rust, ignore use dioxus::prelude::*; fn main() { - dioxus_desktop::launch(App); + launch(App); } // The #[component] attribute streamlines component creation. @@ -71,7 +70,7 @@ let value = "123"; rsx!( div { class: "my-class {value}", // <--- attribute - onclick: move |_| log::info!("clicked!"), // <--- listener + onclick: move |_| info!("clicked!"), // <--- listener h1 { "hello world" }, // <--- child } ) @@ -89,20 +88,12 @@ rsx!( ) ``` -Used within components, the `rsx!` macro must be rendered into an `Element` with -the `render` function on Scope. - -If we want to omit the boilerplate of `cx.render`, we can simply pass in -`cx` as the first argument of rsx. This is sometimes useful when we need to -render nodes in match statements. +The `rsx!` macro is what generates the `Element` that our components return. ```rust, ignore #[component] fn Example() -> Element { - // both of these are equivalent - rsx!("hello world"); - - rsx!("hello world!"); + rsx!("hello world") } ``` @@ -162,11 +153,11 @@ struct HeaderProps { } #[component] -fn Header(cx: Scope) -> Element { +fn Header(props: HeaderProps) -> Element { rsx!( div { - background_color: "{cx.props.color}" - h1 { "{cx.props.title}" } + background_color: "{props.color}" + h1 { "{props.title}" } } ) } @@ -200,11 +191,11 @@ struct HeaderProps<'a> { } #[component] -fn Header(props: HeaderProps) -> Element { +fn Header<'a>(props: HeaderProps<'a>) -> Element { rsx!( div { - background_color: "{cx.props.color}" - h1 { "{cx.props.title}" } + background_color: "{props.color}" + h1 { "{props.title}" } } ) } @@ -234,7 +225,7 @@ but you can turn it off if you wish. ## Hooks While components are reusable forms of UI elements, hooks are reusable forms -of logic. Hooks provide us a way of retrieving state from the `Scope` and using +of logic. Hooks provide us a way of retrieving state from Dioxus' internal `Scope` and using it to render UI elements. By convention, all hooks are functions that should start with `use_`. We can @@ -250,7 +241,7 @@ fn App() -> Element { ``` Hooks are sensitive to how they are used. To use hooks, you must abide by the -["rules of hooks" (borrowed from React)](https://reactjs.org/docs/hooks-rules.html): +["rules of hooks"](https://dioxuslabs.com/learn/0.5/reference/hooks#rules-of-hooks): - Functions with "use\_" should not be called in callbacks - Functions with "use\_" should not be called out of order @@ -269,11 +260,11 @@ fn use_username(d: Uuid) -> bool { } ``` -To create entirely new foundational hooks, we can use the `use_hook` method on `ScopeState`. +To create entirely new foundational hooks, we can use the `use_hook` method. ```rust, ignore fn use_mut_string() -> &mut String { - cx.use_hook(|_| "Hello".to_string()) + use_hook(|_| "Hello".to_string()) } ``` @@ -287,7 +278,7 @@ Using components, templates, and hooks, we can build a simple app. use dioxus::prelude::*; fn main() { - dioxus_desktop::launch(App); + launch(App); } #[component] diff --git a/packages/fullstack/README.md b/packages/fullstack/README.md index 3b1b38d5f..65f2732d1 100644 --- a/packages/fullstack/README.md +++ b/packages/fullstack/README.md @@ -15,7 +15,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/learn/0.4/) | +[Guides](https://dioxuslabs.com/learn/0.5/) | [API Docs](https://docs.rs/dioxus-fullstack/latest/dioxus_sever) | [Chat](https://discord.gg/XgGxMSkvUM) @@ -23,41 +23,25 @@ Fullstack utilities for the [`Dioxus`](https://dioxuslabs.com) framework. # Features -- Intigrations with the [Axum](https::/docs.rs/dioxus-fullstack/latest/dixous_server/axum_adapter/index.html), [Salvo](https::/docs.rs/dioxus-fullstack/latest/dixous_server/salvo_adapter/index.html), and [Warp](https::/docs.rs/dioxus-fullstack/latest/dixous_server/warp_adapter/index.html) server frameworks with utilities for serving and rendering Dioxus applications. +- Integrates with the [Axum](https::/docs.rs/dioxus-fullstack/latest/dixous_server/axum_adapter/index.html) server framework with utilities for serving and rendering Dioxus applications. - [Server functions](https::/docs.rs/dioxus-fullstack/latest/dixous_server/prelude/attr.server.html) allow you to call code on the server from the client as if it were a normal function. - Instant RSX Hot reloading with [`dioxus-hot-reload`](https://crates.io/crates/dioxus-hot-reload). - Passing root props from the server to the client. # Example -Full stack Dioxus in under 50 lines of code +Full stack Dioxus in under 30 lines of code ```rust #![allow(non_snake_case)] use dioxus::prelude::*; -use dioxus_fullstack::prelude::*; -// On the web, run our client code -#[cfg(feature = "web")] fn main() { - dioxus_web::launch_with_props( - app, - get_root_props_from_document().unwrap_or_default(), - dioxus_web::Config::new().hydrate(true), - ); + launch(App); } -// On the server, run a simple warp server -#[cfg(feature = "server")] -#[tokio::main] -async fn main() { - // Automatically handles server side rendering, hot reloading intigration, and hosting server functions - warp::serve(serve_dioxus_application("", ServerConfig::new(app, ()))) - .run(([127, 0, 0, 1], 8080)) - .await; -} - -fn app() -> Element { +#[component] +fn App() -> Element { let meaning = use_signal(|| None); rsx! { @@ -81,7 +65,7 @@ async fn get_meaning(of: String) -> Result, ServerFnError> { ## Getting Started -To get started with full stack Dioxus, check out our [getting started guide](https://dioxuslabs.com/docs/nightly/guide/en/getting_started/ssr.html), or the [full stack examples](https://github.com/DioxusLabs/dioxus/tree/master/packages/fullstack/examples). +To get started with full stack Dioxus, check out our [getting started guide](https://dioxuslabs.com/learn/0.5/getting_started/fullstack), or the [full stack examples](https://github.com/DioxusLabs/dioxus/tree/master/packages/fullstack/examples). ## Contributing diff --git a/packages/hooks/README.md b/packages/hooks/README.md index 5cb908ff6..3e7cbc68c 100644 --- a/packages/hooks/README.md +++ b/packages/hooks/README.md @@ -15,27 +15,26 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/learn/0.4/) | +[Guides](https://dioxuslabs.com/learn/0.5/) | [API Docs](https://docs.rs/dioxus-hooks/latest/dioxus_hooks) | [Chat](https://discord.gg/XgGxMSkvUM) ## Overview -`dioxus-hooks` includes some basic useful hooks for dioxus: +`dioxus-hooks` includes some basic useful hooks for dioxus such as: -- use_state -- use_ref -- use_future +- use_signal +- use_effect +- use_resource +- use_memo - use_coroutine -- use_callback -Unlike React, none of these hooks are foundational since they all build off the primitive `cx.use_hook`. -This crate also provides a few helpful macros to get around some Rust lifetime management issues in async. +Unlike React, none of these hooks are foundational since they all build off the primitive `use_hook`. + +This crate also provides a helpful macro to get around some Rust lifetime management issues in async: - `to_owned![]` -- `use_future()` -- `use_callback!()` ## Contributing diff --git a/packages/hot-reload/README.md b/packages/hot-reload/README.md index d2428e9e9..3a7995cf9 100644 --- a/packages/hot-reload/README.md +++ b/packages/hot-reload/README.md @@ -15,7 +15,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/learn/0.4/) | +[Guides](https://dioxuslabs.com/learn/0.5/) | [API Docs](https://docs.rs/dioxus-hot-reload/latest/dioxus_hot_reload) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/html/README.md b/packages/html/README.md index 93733116c..e244a1f88 100644 --- a/packages/html/README.md +++ b/packages/html/README.md @@ -15,7 +15,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/learn/0.4/) | +[Guides](https://dioxuslabs.com/learn/0.5/) | [API Docs](https://docs.rs/dioxus-html/latest/dioxus_html) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/interpreter/README.md b/packages/interpreter/README.md index a53e4b470..13f6a7954 100644 --- a/packages/interpreter/README.md +++ b/packages/interpreter/README.md @@ -15,7 +15,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/learn/0.4/) | +[Guides](https://dioxuslabs.com/learn/0.5/) | [API Docs](https://docs.rs/dioxus-interpreter-js/latest/dioxus_interpreter_js) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/liveview/README.md b/packages/liveview/README.md index 66065ad31..56a55f654 100644 --- a/packages/liveview/README.md +++ b/packages/liveview/README.md @@ -15,7 +15,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/learn/0.4/) | +[Guides](https://dioxuslabs.com/learn/0.5/) | [API Docs](https://docs.rs/dioxus-liveview/latest/dioxus_liveview) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/mobile/README.md b/packages/mobile/README.md index 1f774c016..c927024c3 100644 --- a/packages/mobile/README.md +++ b/packages/mobile/README.md @@ -29,70 +29,7 @@ Dioxus Mobile supports both iOS and Android. However, Android support is still q Getting set up with mobile can but quite challenging. The tooling here isn't great (yet) and might take some hacking around to get things working. macOS M1 is broadly unexplored and might not work for you. -We're going to be using `cargo-mobile` to build for mobile. First, install it: - -```shell -$ cargo install --git https://github.com/BrainiumLLC/cargo-mobile -``` - -And then initialize your app for the right platform. Use the `winit` template for now. Right now, there's no "Dioxus" template in cargo-mobile. - -```shell -$ cargo mobile init -``` - -We're going to completely clear out the `dependencies` it generates for us, swapping out `winit` with `dioxus-mobile`. - -```toml - -[package] -name = "dioxus-ios-demo" -version = "0.1.0" -authors = ["Jonathan Kelley "] -edition = "2021" - - -# leave the `lib` declaration -[lib] -crate-type = ["staticlib", "cdylib", "rlib"] - - -# leave the binary it generates for us -[[bin]] -name = "dioxus-ios-demo-desktop" -path = "gen/bin/desktop.rs" - -# clear all the dependencies -[dependencies] -mobile-entry-point = "0.1.0" -dioxus = { version = "*", features = ["mobile"] } -simple_logger = "*" -``` - -Edit your `lib.rs`: - -```rust -// main.rs -use dioxus::prelude::*; - -fn main() { - dioxus_mobile::launch(app); -} - -fn app() -> Element { - rsx!{ - div { - "hello world!" - } - }) -} -``` - -To configure the web view, menubar, and other important desktop-specific features, checkout out some of the launch configurations in the [API reference](https://docs.rs/dioxus-mobile/). - -## Future Steps - -Make sure to read the [Dioxus Guide](https://dioxuslabs.com/learn/0.4/) if you already haven't! +You can read [our guide](https://dioxuslabs.com/learn/0.5/getting_started/mobile) on mobile development with Dioxus to get started. ## Contributing diff --git a/packages/router-macro/README.md b/packages/router-macro/README.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/router-macro/src/lib.rs b/packages/router-macro/src/lib.rs index 00a7499a4..0a0c2c8dc 100644 --- a/packages/router-macro/src/lib.rs +++ b/packages/router-macro/src/lib.rs @@ -1,4 +1,3 @@ -#![doc = include_str!("../README.md")] #![doc(html_logo_url = "https://avatars.githubusercontent.com/u/79236386")] #![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")] diff --git a/packages/router/README.md b/packages/router/README.md index c44d6ae8e..91b521b01 100644 --- a/packages/router/README.md +++ b/packages/router/README.md @@ -15,7 +15,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/learn/0.4/router/) | +[Guides](https://dioxuslabs.com/learn/0.5/router/) | [API Docs](https://docs.rs/dioxus-router/latest/dioxus_router) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/rsx-rosetta/README.md b/packages/rsx-rosetta/README.md index f046838c4..45641d988 100644 --- a/packages/rsx-rosetta/README.md +++ b/packages/rsx-rosetta/README.md @@ -15,7 +15,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/learn/0.4/) | +[Guides](https://dioxuslabs.com/learn/0.5/) | [API Docs](https://docs.rs/rsx-rosetta/latest/rsx-rosetta) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/rsx/README.md b/packages/rsx/README.md index 61502fb17..853cebc6e 100644 --- a/packages/rsx/README.md +++ b/packages/rsx/README.md @@ -15,7 +15,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/learn/0.4/) | +[Guides](https://dioxuslabs.com/learn/0.5/) | [API Docs](https://docs.rs/dioxus-rsx/latest/dioxus_rsx) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/ssr/README.md b/packages/ssr/README.md index 10d6fae1b..366f16340 100644 --- a/packages/ssr/README.md +++ b/packages/ssr/README.md @@ -9,8 +9,8 @@ This crate is a part of the broader Dioxus ecosystem. For more resources about Dioxus, check out: -- [Getting Started](https://dioxuslabs.com/learn/0.4/getting_started) -- [Book](https://dioxuslabs.com/learn/0.4/) +- [Getting Started](https://dioxuslabs.com/learn/0.5/getting_started) +- [Book](https://dioxuslabs.com/learn/0.5/) - [Examples](https://github.com/DioxusLabs/example-projects) ## Overview diff --git a/packages/web/README.md b/packages/web/README.md index 561da808c..22f453482 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -15,7 +15,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/learn/0.4/) | +[Guides](https://dioxuslabs.com/learn/0.5/) | [API Docs](https://docs.rs/dioxus-web/latest/dioxus_web) | [Chat](https://discord.gg/XgGxMSkvUM)