mirror of
https://github.com/DioxusLabs/dioxus
synced 2025-03-03 23:07:10 +00:00
* Move getting started to Guide * Clean up summary and getting started * Shorten intro by moving stuff to individual platform docs * Make intro even shorter, summarize features * Further cleanup; move development-related docs to separate section * Make `guide` a crate. Turn code samples into examples so that we can check if they compile * Rewrite "Describing the UI": * Focus on RSX syntax (interactivity covered in later chapters); make sure samples are tested; concise language * Move some "special attribute" samples to the `examples` directory * Simplify introduction to components * Simplify introduction to component props * Document Prop features; add code samples * Simplify component children docs * Interactivity: better introduction to events * Hooks: better introduction * Remove outdated doc * Introducs use_ref * Simplify User Input chapter * Document event handler props * Meme editor example * Meme editor walkthrough * Add dark mode example * Guide for context; dark mode example * Guide: custom hooks * Guide: conditional rendering * Guide: rendering lists * Guide: rendering lists + keys * Move remaining infor from Reference to guide * Delete reference book
13 lines
273 B
Rust
13 lines
273 B
Rust
#![allow(unused)]
|
|
|
|
use dioxus::prelude::*;
|
|
|
|
fn main() {}
|
|
|
|
struct AppSettings {}
|
|
|
|
// ANCHOR: wrap_context
|
|
fn use_settings(cx: &ScopeState) -> UseSharedState<AppSettings> {
|
|
use_context::<AppSettings>(&cx).expect("App settings not provided")
|
|
}
|
|
// ANCHOR_END: wrap_context
|