@@ -22,11 +22,11 @@ export { useAsyncIterState, type AsyncIterStateResult, type AsyncIterableChannel
2222 * ```tsx
2323 * // Quick usage:
2424 *
25- * import { useAsyncIterState, Iterate } from 'async- react-iterators';
25+ * import { useAsyncIterState, Iterate } from 'react-async -iterators';
2626 *
2727 * function MyForm() {
28- * const [firstNameIter, setFirstName] = useAsyncIterState<string>( );
29- * const [lastNameIter, setLastName] = useAsyncIterState<string>( );
28+ * const [firstNameIter, setFirstName] = useAsyncIterState('' );
29+ * const [lastNameIter, setLastName] = useAsyncIterState('' );
3030 * return (
3131 * <div>
3232 * <form>
@@ -43,9 +43,10 @@ export { useAsyncIterState, type AsyncIterStateResult, type AsyncIterableChannel
4343 * ---
4444 *
4545 * The returned async iterable can be passed over to any level down the component tree and rendered
46- * using `<Iterate>`, `useAsyncIter`, and so on. It also contains a `.current.value` property which shows
47- * the current up to date state value at all times. Use this any case you just need to read the immediate
48- * current state rather than directly rendering it, since for rendering you may simply async-iterate it.
46+ * using `<Iterate>`, `useAsyncIter`, and others. It also contains a `.current.value` property which shows
47+ * the current up to date state value at all times. Use this any time you need to read the immediate
48+ * current state (for example as part of side effect logic) rather than directly rendering it, since
49+ * for rendering you may simply iterate values as part of an `<Iterate>`.
4950 *
5051 * Returned also alongside the async iterable is a function for updating the state. Calling it with a new
5152 * value will cause the paired iterable to yield the updated state value as well as immediately set the
@@ -55,19 +56,19 @@ export { useAsyncIterState, type AsyncIterStateResult, type AsyncIterableChannel
5556 *
5657 * Unlike vanila `React.useState`, which simply re-renders the entire component - `useAsyncIterState`
5758 * helps confine UI updates by handing you an iterable which choose how and where in the component tree
58- * to render it. This work method can facilitate layers of sub-components that pass actual async iterables
59- * across one another as props, skipping typical cascading re-renderings down to __only the inner-most
60- * leafs__ of the UI tree.
59+ * to render it. This method of working can facilitate layers of sub-components that pass actual async
60+ * iterables down to one another as props, avoiding typical cascading re-renderings, updating __only
61+ * the inner-most leafs__ in the UI tree instead .
6162 *
6263 * @example
6364 * ```tsx
6465 * // Use the state iterable's `.current.value` property to read the immediate current state:
6566 *
66- * import { useAsyncIterState } from 'async- react-iterators';
67+ * import { useAsyncIterState } from 'react-async -iterators';
6768 *
6869 * function MyForm() {
69- * const [firstNameIter, setFirstName] = useAsyncIterState<string>( );
70- * const [lastNameIter, setLastName] = useAsyncIterState<string>( );
70+ * const [firstNameIter, setFirstName] = useAsyncIterState('' );
71+ * const [lastNameIter, setLastName] = useAsyncIterState('' );
7172 *
7273 * return (
7374 * <form
0 commit comments