We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcaf4cb commit 2f991f3Copy full SHA for 2f991f3
src/TrainSimulator.js
@@ -1,9 +1,7 @@
1
import React, { useState, useRef } from 'react';
2
3
function TrainSimulator() {
4
- const [speed, setSpeed] = useState(0);
5
- const [throttle, setThrottle] = useState(0);
6
- const [pressure, setPressure] = useState(0);
+
7
const [isRunning, setIsRunning] = useState(false);
8
const intervalRef = useRef(null);
9
0 commit comments