Skip to content

Commit 1903e42

Browse files
committed
docs: Clean up comments
1 parent 0e00bd5 commit 1903e42

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

site/src/components/UserAutocomplete/UserAutocomplete.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,20 @@ export const UserAutocomplete: FC<UserAutocompleteProps> = ({
3838
const [searchState, sendSearch] = useMachine(searchUserMachine);
3939
const { searchResults } = searchState.context;
4040

41-
// seed list of options on the first page load if a user passes in a value
42-
// since some organizations have long lists of users, we do not load all
43-
// options on page load.
41+
// Seed list of options on the first page load if a user passes in a value.
42+
// Since some organizations have long lists of users, we do not want to load
43+
// all options on page load.
4444
const onMountRef = useRef(value);
4545
useEffect(() => {
4646
const mountValue = onMountRef.current;
4747
if (mountValue) {
4848
sendSearch("SEARCH", { query: mountValue.email });
4949
}
5050

51-
// 2023-09-15 - This isn't in XState's docs, but its source code guarantees
52-
// that the memory reference of sendSearch will stay stable across renders.
53-
// This useEffect call will behave like an on-mount effect and will not ever
54-
// need to resynchronize
51+
// This isn't in XState's docs, but its source code guarantees that the
52+
// memory reference of sendSearch will stay stable across renders. This
53+
// useEffect call will behave like an on-mount effect and will not ever need
54+
// to resynchronize
5555
}, [sendSearch]);
5656

5757
const { debounced: debouncedOnChange } = useDebouncedFunction(

0 commit comments

Comments
 (0)