Fix the router and stub out a number of crates to get compiling

This commit is contained in:
Jonathan Kelley committed 2024-01-13 20:51:37 -08:00
1 parent 4c6e515da4
commit fae0b08e61
226 files changed
+1057 -1482

No files matched your search

+6 -6
View File
@@ -9,9 +9,9 @@ fn main() {
static NAME: Atom<String> = Atom(|_| "world".to_string());
fn app(cx: Scope) -> Element {
fn app() -> Element {
use_init_atom_root(cx);
let name = use_read(cx, &NAME);
let name = use_read(&NAME);
cx.render(rsx! {
div { "hello {name}!" }
@@ -20,8 +20,8 @@ fn app(cx: Scope) -> Element {
})
}
fn Child(cx: Scope) -> Element {
let set_name = use_set(cx, &NAME);
fn Child() -> Element {
let set_name = use_set(&NAME);
cx.render(rsx! {
button {
@@ -33,8 +33,8 @@ fn Child(cx: Scope) -> Element {
static NAMES: AtomRef<Vec<String>> = AtomRef(|_| vec!["world".to_string()]);
fn ChildWithRef(cx: Scope) -> Element {
let names = use_atom_ref(cx, &NAMES);
fn ChildWithRef() -> Element {
let names = use_atom_ref(&NAMES);
cx.render(rsx! {
div {