Separate event type on server side

This commit is contained in:
2022-02-15 19:22:33 +02:00
parent 2977247193
commit ddc73ad30c
2 changed files with 3 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ import { useSSE, SSEProvider, createCustomSource } from 'react-hooks-sse';
import './App.css';
import EventList from '../eventList/EventList.js';
function SSE() {
const SSE = () => {
const state = useSSE('events');
const [events, setEvents] = useState([]); // initialises Event state