NodeJS TypeScript Configuration
start
jsxcopy
const TestComponent = () => {
const [count, setCount] = useState(0);
const handleIncrement = () => {
setCount(prev + 1);
};
const handleDecrement = () => {
setCount(prev + 1);
};
return (
<>{count}</>
<button
type="button"
onClick={handleIncrement}
>
Increment
</button>
<button
type="button"
onClick={handleDecrement}
>
Decrement
</button>
); };
export default TestComponent;