mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
feat: provide deprecated create_rw_signal
(#2824)
This commit is contained in:
parent
e01dfbf497
commit
2470036f57
1 changed files with 11 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue