don't expose the signal scope subscriber API publicly

This commit is contained in:
Evan Almloff committed 2024-02-05 08:13:52 -06:00
1 parent 30bac267c9
commit 91fea15cdc
4 files changed
+18 -7

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ pub fn use_effect(mut callback: impl FnMut() + 'static) {
use_hook(|| {
spawn(async move {
let rc = ReactiveContext::new(None);
let rc = ReactiveContext::new();
loop {
// Wait for the dom the be finished with sync work
+2 -2
View File
@@ -49,7 +49,7 @@ pub fn use_maybe_sync_memo<R: PartialEq, S: Storage<SignalData<R>>>(
) -> ReadOnlySignal<R, S> {
use_hook(|| {
// Get the current reactive context
let rc = ReactiveContext::new(None);
let rc = ReactiveContext::new();
// Create a new signal in that context, wiring up its dependencies and subscribers
let mut state: Signal<R, S> = rc.run_in(|| Signal::new_maybe_sync(f()));
@@ -129,7 +129,7 @@ where
let selector = use_hook(|| {
// Get the current reactive context
let rc = ReactiveContext::new(None);
let rc = ReactiveContext::new();
// Create a new signal in that context, wiring up its dependencies and subscribers
let mut state: Signal<R, S> =
+1 -1
View File
@@ -20,7 +20,7 @@ where
{
let mut value = use_signal(|| None);
let mut state = use_signal(|| UseResourceState::Pending);
let rc = use_hook(|| ReactiveContext::new(None));
let rc = use_hook(ReactiveContext::new);
let mut cb = use_callback(move || {
// Create the user's task