add comment

This commit is contained in:
Billy Vong 2021-12-16 17:03:49 -05:00
parent 2804b6ae56
commit 2e9a42d74c

@ -52,6 +52,8 @@ export function TerminalInput({ terminal, router, player }: IProps): React.React
const [possibilities, setPossibilities] = useState<string[]>([]); const [possibilities, setPossibilities] = useState<string[]>([]);
const classes = useStyles(); const classes = useStyles();
// Need to run after state updates, for example if we need to move cursor
// *after* we modify input
useEffect(() => { useEffect(() => {
if (postUpdateValue?.postUpdate) { if (postUpdateValue?.postUpdate) {
postUpdateValue.postUpdate(); postUpdateValue.postUpdate();