Fix the router and stub out a number of crates to get compiling
This commit is contained in:
226 files changed
+1057
-1482
No files matched your search
@@ -27,8 +27,8 @@ impl CoolData {
|
||||
|
||||
#[component]
|
||||
#[rustfmt::skip]
|
||||
pub fn App(cx: Scope) -> Element {
|
||||
use_shared_state_provider(cx, || CoolData::new(HashMap::from([
|
||||
pub fn App() -> Element {
|
||||
use_shared_state_provider(|| CoolData::new(HashMap::from([
|
||||
(0, "Hello, World!".to_string()),
|
||||
(1, "Dioxus is amazing!".to_string())
|
||||
])));
|
||||
@@ -50,8 +50,8 @@ pub fn App(cx: Scope) -> Element {
|
||||
}
|
||||
|
||||
#[component]
|
||||
fn DataEditor(cx: Scope, id: usize) -> Element {
|
||||
let data = use_shared_state::<CoolData>(cx)?;
|
||||
fn DataEditor(id: usize) -> Element {
|
||||
let data = use_shared_state::<CoolData>()?;
|
||||
|
||||
render! {
|
||||
p {
|
||||
@@ -61,8 +61,8 @@ fn DataEditor(cx: Scope, id: usize) -> Element {
|
||||
}
|
||||
|
||||
#[component]
|
||||
fn DataView(cx: Scope, id: usize) -> Element {
|
||||
let data = use_shared_state::<CoolData>(cx)?;
|
||||
fn DataView(id: usize) -> Element {
|
||||
let data = use_shared_state::<CoolData>()?;
|
||||
|
||||
render! {
|
||||
input {
|
||||
|
||||
Reference in new issue
Block a user