From a5c3be586aed24bb5adc7b4477a86cbdbfc3bd69 Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Sat, 13 May 2023 19:43:17 -0400 Subject: [PATCH] docs: tweak new slice docs --- leptos_reactive/src/slice.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/leptos_reactive/src/slice.rs b/leptos_reactive/src/slice.rs index 0cd2a160e..5d9d66e96 100644 --- a/leptos_reactive/src/slice.rs +++ b/leptos_reactive/src/slice.rs @@ -83,8 +83,8 @@ where ) } -/// create_read_slice Is a read only version of create_slice. It's memoized just like create_slice. -/// In fact, create_slice uses create_read_slice to construct it's read portion. +/// Takes a memoized, read-only slice of a signal. This is equivalent to the +/// read-only half of [`create_slice`]. pub fn create_read_slice( cx: Scope, signal: RwSignal, @@ -95,8 +95,9 @@ where { create_memo(cx, move |_| signal.with(getter)).into() } -/// create_write_slice is the write portion of create_slice -/// use it when you want to write to a state, but not subscribe to changes. + +/// Creates a setter to access one slice of a signal. This is equivalent to the +/// write-only half of [`create_slice`]. pub fn create_write_slice( cx: Scope, signal: RwSignal,