Hello,Bony Roopchandani
I now come across a feature that stores the history command to localStorage in the browser for persistent storage, so I use the appendCommandToHistory method, but when I try to do an array loop call for example:
["1", "2", "3"].forEach((item) => { appendCommandToHistory(item); });
When you use the keys on the keyboard to scroll through the history command, only the last command, that is, "3"
And I will see the code, the SRC/contexts/TerminalContext TSX appendCommandToHistory instead of the following is ok
` const appendCommandToHistory = (command: string) => {
if (!command) {
return;
}
setCommandsHistory((prevCommandsHistory) => [
...prevCommandsHistory,
command,
]);
};`
I hope to update the code, and I am very interested in react-terminal and would like to be a contributor
Hello,Bony Roopchandani
I now come across a feature that stores the history command to localStorage in the browser for persistent storage, so I use the appendCommandToHistory method, but when I try to do an array loop call for example:
["1", "2", "3"].forEach((item) => { appendCommandToHistory(item); });When you use the keys on the keyboard to scroll through the history command, only the last command, that is, "3"
And I will see the code, the SRC/contexts/TerminalContext TSX appendCommandToHistory instead of the following is ok
` const appendCommandToHistory = (command: string) => {
if (!command) {
return;
}
};`
I hope to update the code, and I am very interested in react-terminal and would like to be a contributor