feat: provide deprecated create_rw_signal (#2824)

This commit is contained in:
Álvaro Mondéjar Rubio 2024-08-14 00:42:47 +02:00 committed by GitHub
parent e01dfbf497
commit 2470036f57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -175,3 +175,14 @@ pub fn create_signal<T: Send + Sync + 'static>(
) -> (ReadSignal<T>, WriteSignal<T>) {
signal(value)
}
/// Creates a reactive signal with the getter and setter unified in one value.
#[inline(always)]
#[track_caller]
#[deprecated = "This function is being removed to conform to Rust idioms. \
Please use `RwSignal::new()` instead."]
pub fn create_rw_signal<T: Send + Sync + 'static>(
value: T,
) -> RwSignal<T> {
RwSignal::new(value)
}