Reduce environment variables number + optimise code
This commit is contained in:
@@ -4,7 +4,7 @@ import EventList from '../eventList/EventList.js';
|
||||
|
||||
function App(props) {
|
||||
const [events, setEvents] = useState(['EventLog']); // initialises Event state
|
||||
const [sse, setSse] = useState(new EventSource('/events', { withCredentials: true})) // creates eventSource listener
|
||||
const [sse, setSse] = useState(new EventSource('/events', { withCredentials: true})) // creates eventSource listener in state
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
|
Reference in New Issue
Block a user