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
@@ -14,7 +14,7 @@ fn create_signals_global() {
|
||||
}
|
||||
});
|
||||
|
||||
fn Child(cx: Scope) -> Element {
|
||||
fn Child() -> Element {
|
||||
let signal = create_without_cx();
|
||||
|
||||
render! {
|
||||
@@ -39,7 +39,7 @@ fn deref_signal() {
|
||||
}
|
||||
});
|
||||
|
||||
fn Child(cx: Scope) -> Element {
|
||||
fn Child() -> Element {
|
||||
let signal = Signal::new("hello world".to_string());
|
||||
|
||||
// You can call signals like functions to get a Ref of their value.
|
||||
@@ -66,7 +66,7 @@ fn drop_signals() {
|
||||
}
|
||||
});
|
||||
|
||||
fn Child(cx: Scope) -> Element {
|
||||
fn Child() -> Element {
|
||||
let signal = create_without_cx();
|
||||
|
||||
render! {
|
||||
|
||||
@@ -22,7 +22,7 @@ fn effects_rerun() {
|
||||
let counter = cx.props;
|
||||
counter.borrow_mut().component += 1;
|
||||
|
||||
let mut signal = use_signal(cx, || 0);
|
||||
let mut signal = use_signal(|| 0);
|
||||
cx.use_hook(move || {
|
||||
to_owned![counter];
|
||||
Effect::new(move || {
|
||||
|
||||
@@ -23,7 +23,7 @@ fn memos_rerun() {
|
||||
let counter = cx.props;
|
||||
counter.borrow_mut().component += 1;
|
||||
|
||||
let mut signal = use_signal(cx, || 0);
|
||||
let mut signal = use_signal(|| 0);
|
||||
let memo = cx.use_hook(move || {
|
||||
to_owned![counter];
|
||||
selector(move || {
|
||||
@@ -63,7 +63,7 @@ fn memos_prevents_component_rerun() {
|
||||
let counter = Rc::new(RefCell::new(RunCounter::default()));
|
||||
let mut dom = VirtualDom::new_with_props(
|
||||
|cx| {
|
||||
let mut signal = use_signal(cx, || 0);
|
||||
let mut signal = use_signal(|| 0);
|
||||
|
||||
if generation() == 1 {
|
||||
*signal.write() = 0;
|
||||
|
||||
@@ -19,7 +19,7 @@ fn reading_subscribes() {
|
||||
let counter = Rc::new(RefCell::new(RunCounter::default()));
|
||||
let mut dom = VirtualDom::new_with_props(
|
||||
|cx| {
|
||||
let mut signal = use_signal(cx, || 0);
|
||||
let mut signal = use_signal(|| 0);
|
||||
|
||||
println!("Parent: {:?}", cx.scope_id());
|
||||
if generation() == 1 {
|
||||
|
||||
Reference in new issue
Block a user