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
+6
-6
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user