Open vBoykoGit opened 5 years ago
this might help:
const printInTerminal = (content) => {
terminalRef.current.state.instances[0].instance.updater.enqueueSetState(
terminalRef.current.state.instances[0].instance,
{
summary: [
...terminalRef.current.state.instances[0].instance.state.summary,
...(Array.isArray(content) ? content.map((c) => [c]) : [content]),
],
}
);
};
To print one line just do printInTerminal('Hello world!')
To print multiple lines do printInTerminal(['Hello world!', 'Foo bar'])
Hi, I want to send messages to terminal from code like
console.log('message')
but without showing it in application console