v2.0.0
Initial state is no longer passed to hook. It will be always set to null
.
// before
const [data, error] = useSSE(
{ data: 'initial data' }
() => {
return fetch();
},
[]
);
// after
const [data, error] = useSSE(() => {
return fetch();
}, []);