import React from 'react';
import {render, Box, Text, useStdout} from '../../src/index.js';
function Example() {
const {stdout, write} = useStdout();
React.useEffect(() => {
const timer = setInterval(() => {
write('Hello from Ink to stdout\n');
}, 1000);
return () => {
clearInterval(timer);
};
}, []);
return (
Terminal dimensions:
Width: {stdout.columns}
Height: {stdout.rows}
);
}
render();